seedlinux

find open source torrents and stats for people wishing to contribute bandwidth.
git clone git://git.beardyjay.co.uk/seedlinux
Log | Files | Refs | README | LICENSE

commit 183558bc25a2b8bed0fb23acfb3dd587be740710
parent 104be15af5ddb7e7d8389a204eb7fec3e77a81c4
Author: Jay Scott <jay@jayscott.co.uk>
Date:   Thu,  6 Jul 2017 21:29:35 +0100

loaded opbeat middleware to early

Diffstat:
Mapp.js | 10++++++----
1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/app.js b/app.js @@ -1,9 +1,6 @@ 'use strict'; -if(process.env.NODE_ENV === 'production') { - const opbeat = require('opbeat').start(); - app.use(opbeat.middleware.express()); -} + const express = require('express'); const path = require('path'); @@ -25,6 +22,11 @@ db.on('error', console.error.bind(console, 'MongoDB connection error:')); const app = express(); +if(process.env.NODE_ENV === 'production') { + const opbeat = require('opbeat').start(); + app.use(opbeat.middleware.express()); +} + app.set('views', path.join(__dirname, 'views')); app.set('view engine', 'pug');