micro-trackjs

1.0.2 • Public • Published

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 git@github.com:pauldariye/micro-trackjs.git
cd micro-trackjs && yarn # or npm install
yarn test

Acknowledgements

License

MIT

Package Sidebar

Install

npm i micro-trackjs

Weekly Downloads

13

Version

1.0.2

License

MIT

Unpacked Size

9.75 kB

Total Files

9

Last publish

Collaborators

  • tgmorais