mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-18 15:17:25 +01:00
chore(newrelic): some newrelic code location experiments
This commit is contained in:
@@ -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');
|
||||
};
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user