2.0.1 • Published 7 years ago

meanie-express-raven-service v2.0.1

Weekly downloads
2
License
MIT
Repository
github
Last release
7 years ago

meanie-express-raven-service

Deprecated

This package has been deprecated in favour of using a simple initialisation script for error handling and using Raven directly:

'use strict';

/**
 * Dependencies
 */
const raven = require('raven');
const {SENTRY_DSN, SENTRY_CONFIG} = require('./config');

//Use sentry
if (SENTRY_DSN) {

  //Get config
  const config = Object.assign({
    environment: process.env.APP_ENV || process.env.NODE_ENV,
  }, SENTRY_CONFIG);

  //Create callback
  const cb = function() {
    console.log('Exiting due to uncaught exception');
    process.exit(1);
  };

  //Configure
  raven
    .config(SENTRY_DSN, config)
    .install(cb);
}

Then later just use Raven directly:

const raven = require('raven');
raven.captureException(error, data);

Or make use of the trackWithSentry middleware from @meanie/express-error-handling.

License

(MIT License)

Copyright 2016-2017, Adam Reis

2.0.1

7 years ago

2.0.0

7 years ago

1.2.0

7 years ago

1.1.0

7 years ago

1.0.1

7 years ago

1.0.0

8 years ago