Skip to content

eggjs-community/egg-bugsnag

Repository files navigation

egg-bugsnag

NPM version build status Test coverage David deps Known Vulnerabilities npm download FOSSA Status

bugsnag plugin for egg.js

Install

$ npm i egg-bugsnag --save

Usage

// {app_root}/config/plugin.js
exports.bugsnag = {
  enable: true,
  package: 'egg-bugsnag',
};
// {app_root}/app/controller/test.js
exports.list = function* () {
  this.body = yield this.app.bugsnag.notify(new Error('Test error'), 
  function(error, response) {
  
  });
};

see bugsnag or bugsnag for koa for more api.

Configuration

// {app_root}/config/config.default.js
exports.bugsnag = {
  key: 'Your own bugsnag key',
};

see config/config.default.js for more detail.

License

MIT

FOSSA Status