sails-hook-opbeat
v1.0.3
Published
Opbeat implementation for Sails.js application
Downloads
4
Readme
#Opbeat hook for Sails.js
Installation
To install Opbeat hook follow this simaple steps:
- Install hook via npm
npm install --save sails-hook-opbeat
- Configure hook [See configuration section][1]
- Add this following line in the first line of your
app.js
:require('sails-hook-opbeat/register');
[1]: Configuration
List of available options for Opbeat hook you could see here: Opbeat configuration
Create a config file config/opbeat.js
with this content:
module.exports.opbeat = {
/**
* Your Opbeat application id
* @type {String}
*/
appId: '',
/**
* Your Opbeat organization id
* @type {String}
*/
organizationId: '',
/**
* Your Opbeat secret token
* @type {String}
*/
secretToken: '',
/**
* Is Opbeat active now
*/
active: process.env.NODE_ENV === 'production'
};