Skip to content

iampeterbanjo/hapi-roller

Repository files navigation

Hapi rollbar

Hapi [plugin] for rollbar

Getting started

const Hapi = require('@hapi/hapi');
const plugin = require('hapi-rollbar');

const server = Hapi.Server();

server.register({
  plugin,
  options: {
    accessToken: process.env.ROLLBAR_ACCESS_TOKEN,
    captureUncaught: true,
    captureUnhandledRejections: true,
  },
});

Options are based directly to Rollbar so check the docs for a full list.

Development

  • Run yarn test-watch to watch tests
  • Run yarn deploy to run tests, push and publish package

Requirements

  • Node 10+