Skip to content

Commit

Permalink
update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
epappas committed Apr 20, 2015
1 parent 1a89023 commit dbf4876
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,28 @@
# rollbar-hapi
A Hapi plugin for rollbar painless integration

# installation

npm install rollbar-hapi --save

# Use of

server.register({
register: require('./rollbar/index'),
options: {
accessToken: '',
environment: '', // optional, defaults to process.env.NODE_ENV
exitOnUncaughtException: true // optional, defaults to true
}
}, function (err) {
if (err) throw err;
});

# Exposes

server.plugins['rollbar-hapi'].rollbar // the rollbar module, already initialised

server.methods.handleError(err, req, next); // == rollbar.handleError
server.methods.handleErrorWithPayloadData(err, opts, req, next); // == rollbar.handleErrorWithPayloadData
server.methods.reportMessage(msg, level, req, next); // == rollbar.reportMessage
server.methods.reportMessageWithPayloadData(msg, opts, req, next); // == rollbar.reportMessageWithPayloadData

0 comments on commit dbf4876

Please sign in to comment.