mirror of
https://github.com/sudoxnym/habitica.git
synced 2026-04-14 19:56:23 +00:00
chore(newrelic): some newrelic code location experiments
This commit is contained in:
parent
416feca42e
commit
6f2f3dd71e
3 changed files with 4 additions and 8 deletions
|
|
@ -20,6 +20,6 @@ exports.config = {
|
|||
* issues with the agent, 'info' and higher will impose the least overhead on
|
||||
* production applications.
|
||||
*/
|
||||
level : 'trace'
|
||||
level : 'warning'
|
||||
}
|
||||
};
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
// Only do the minimal amount of work before forking just in case of a dyno restart
|
||||
var nconf = require('nconf');
|
||||
var utils = require('./utils');
|
||||
utils.setupConfig();
|
||||
|
||||
require('coffee-script') // remove this once we've fully converted over
|
||||
var express = require("express");
|
||||
|
|
@ -8,18 +9,12 @@ var path = require("path");
|
|||
var domainMiddleware = require('domain-middleware');
|
||||
var swagger = require("swagger-node-express");
|
||||
|
||||
var utils = require('./utils');
|
||||
var middleware = require('./middleware');
|
||||
|
||||
var TWO_WEEKS = 1000 * 60 * 60 * 24 * 14;
|
||||
var app = express();
|
||||
var server;
|
||||
|
||||
// ------------ Setup configurations ------------
|
||||
utils.setupConfig();
|
||||
if (nconf.get('NODE_ENV') === 'production')
|
||||
require('newrelic');
|
||||
|
||||
// ------------ MongoDB Configuration ------------
|
||||
mongoose = require('mongoose');
|
||||
require('./models/user'); //load up the user schema - TODO is this necessary?
|
||||
|
|
|
|||
|
|
@ -56,6 +56,7 @@ module.exports.setupConfig = function(){
|
|||
if (nconf.get('NODE_ENV') === "development") {
|
||||
Error.stackTraceLimit = Infinity;
|
||||
}
|
||||
if (nconf.get('NODE_ENV') === 'production') require('newrelic');
|
||||
};
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue