diff --git a/app.js b/app.js index fa8964fb3..381e531b3 100644 --- a/app.js +++ b/app.js @@ -23,6 +23,11 @@ var nconf = require('nconf'); nconf.argv().env('__'); +// https://github.com/rockq-org/cnodebb/issues/37 +if(nconf.get('is_oneapm') == 'true'){ + require('oneapm'); +} + var url = require('url'), async = require('async'), winston = require('winston'), diff --git a/loader.js b/loader.js index 96a3e65f4..59ca9947f 100644 --- a/loader.js +++ b/loader.js @@ -14,11 +14,6 @@ nconf.argv().env('__').file({ file: path.join(__dirname, '/config.json') }); -// https://github.com/rockq-org/cnodebb/issues/37 -if(nconf.get('is_oneapm') == 'true'){ - require('oneapm'); -} - var pidFilePath = __dirname + '/pidfile', output = logrotate({ file: __dirname + '/logs/output.log', size: '1m', keep: 3, compress: true }), silent = nconf.get('silent') === 'false' ? false : nconf.get('silent') !== false,