Simple exception tracking for small Express/Koa servers.
- Log uncaught exceptions to a data store of your choice
- View exceptions in the browser with a password-protected middleware in your app
- Get notified via email when an exception occurs (TODO)
Install with NPM:
npm install --save trackerr
or Yarn:
yarn add trackerr
Create a new client with a data store:
import { Client } from 'trackerr';
import { SQLiteStore } from 'trackerr-sqlite';
const trackerr = new Client(new SQLiteStore('db.sql'));
trackerr will automatically begin to watch for uncaught exceptions in your app's process.
To use the middleware:
server.use(trackerr.middleware());
The middleware will serve the trackerr page at /__exceptions
.
The exception data may be stored in any data store of your choice. You may use one of the following maintained data stores or write your own plugin by implementing the ExceptionDataStore
interface in tracker-abstract-datastore.
trackerr is free and open-source. It provides a simple middleware that mounts on your app, instead of relying on a third-party solution (like Airbrake or Sentry) or managing another server (like Errbit).
- Add password protection to trackerr page
- Email notifications
- The idea for this project was originally shared here.