Snippets Collections
//Installation
//Install the Rollbar rollbar.js package using npm:
// npm install --save rollbar


// include and initialize the rollbar library with your access token
var Rollbar = require('rollbar')
var rollbar = new Rollbar({
  accessToken: '<ACCESS_TOKEN>',
  captureUncaught: true,
  captureUnhandledRejections: true,
})

// record a generic message and send it to Rollbar
rollbar.log('Hello world!')
star

Mon Nov 28 2022 04:12:19 GMT+0000 (Coordinated Universal Time) https://app.rollbar.com/onboarding/install/rb-node-js-default

#javascript #nodejs #rollbar

Save snippets that work with our extensions

Available in the Chrome Web Store Get Firefox Add-on Get VS Code extension