| trying opbeat instead of newrelic - seedlinux - Torrent indexing tool opensourc… | |
| Log | |
| Files | |
| Refs | |
| README | |
| --- | |
| commit fd48240895c53ea1dabbb18e258d9931404c1c54 | |
| parent dcfc033b4a8c665c42a98e419c2da3c2cafe2e2f | |
| Author: Jay Scott <[email protected]> | |
| Date: Thu, 6 Jul 2017 21:09:23 +0100 | |
| trying opbeat instead of newrelic | |
| Diffstat: | |
| M app.js | 4 +++- | |
| M package.json | 2 +- | |
| 2 files changed, 4 insertions(+), 2 deletions(-) | |
| --- | |
| diff --git a/app.js b/app.js | |
| @@ -1,7 +1,8 @@ | |
| 'use strict'; | |
| if(process.env.NODE_ENV === 'production') { | |
| - require('newrelic'); | |
| + const opbeat = require('opbeat').start(); | |
| + app.use(opbeat.middleware.express()); | |
| } | |
| const express = require('express'); | |
| @@ -31,6 +32,7 @@ app.use(helmet({ | |
| hsts: false | |
| })); | |
| + | |
| app.use(compression()); | |
| app.use(logger('dev')); | |
| app.use(bodyParser.json()); | |
| diff --git a/package.json b/package.json | |
| @@ -20,7 +20,7 @@ | |
| "helmet": "^3.6.1", | |
| "mongoose": "4.10.8", | |
| "morgan": "~1.8.1", | |
| - "newrelic": "^1.40.0", | |
| + "opbeat": "^4.14.0", | |
| "parse-torrent": "^5.8.3", | |
| "pug": "^2.0.0-rc.2", | |
| "webtorrent-health": "^1.1.1" |