JSPM

  • Created
  • Published
  • Downloads 2556
  • Score
    100M100P100Q148403F
  • License MIT

Middleware for Treblle integration

Package Exports

  • treblle

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (treblle) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

treblle

Middleware for Treblle integration.

Installation

$ npm install treblle

Usage

To use the treblle middleware successfuly:

const app = express();

app.use(express.json());

useTreblle(app, {
  apiKey: __treblle_apiKey__,
  projectId: __treblle_projectId__,
});

You have to enable JSON parsing before calling the useTreblle function.

body-parser

If you are using the body-parser package then enable the plugin like this:

const app = express();

app.use(bodyParser.json())

useTreblle(app, {
  apiKey: __treblle_apiKey__,
  projectId: __treblle_projectId__,
});

API Key and Project ID

Both the API key and Project ID can be fetched from Treblle's site.

The API key can be found in User settings. And the Project ID can be found in your project settings, you can find your projects in Treblle's Dashboard.

License

MIT