micro-trackjs
v1.0.2
Published
A simple wrapper to send micro errors to TrackJS
Downloads
140
Maintainers
Readme
micro-trackjs
micro-trackjs
allows you to send micro
errors to TrackJS.
This little library was inspired it's "siblings" here:
https://github.com/amio/awesome-micro#loggers-errors--reporting
Usage
npm i micro-trackjs
Basic Example
const trackjs = require("micro-trackjs");
const token = "your trackjs app token";
module.exports = trackjs(token)(async (req, res) => {
throw Error("hello micro-trackjs");
});
Example with options
See docs for full options:
https://docs.trackjs.com/node-agent/sdk-reference/agent-options/
const trackjs = require("micro-trackjs");
const token = "your trackjs app token";
module.exports = trackjs(key, { application: "my-application" })(
async (req, res) => {
throw Error("hellow micro-trackjs");
}
);
Development
git clone [email protected]:pauldariye/micro-trackjs.git
cd micro-trackjs && yarn # or npm install
yarn test
Acknowledgements
License
MIT