Skip to content

Commit

Permalink
update and fix requir newrelic
Browse files Browse the repository at this point in the history
  • Loading branch information
giovanigenerali committed Oct 3, 2017
1 parent 9b81f2c commit c3260ad
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 6 deletions.
5 changes: 4 additions & 1 deletion app.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
require('newrelic');
const jsonServer = require('json-server')
const server = jsonServer.create()
const router = jsonServer.router('db.json')
const middlewares = jsonServer.defaults()

if (process.env.NODE_ENV == 'production') {
require('newrelic');
}

server.all('*', (req, res, next) => {
if (req.method !== 'GET') {
res.status(403).jsonp({
Expand Down
8 changes: 4 additions & 4 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
},
"dependencies": {
"json-server": "^0.12.0",
"newrelic": "^2.2.1"
"newrelic": "^2.2.2"
},
"devDependencies": {
"mocha": "^3.5.3",
Expand Down

0 comments on commit c3260ad

Please sign in to comment.