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
|
* issues with the agent, 'info' and higher will impose the least overhead on
|
||||||
* production applications.
|
* 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 nconf = require('nconf');
|
||||||
|
var utils = require('./utils');
|
||||||
|
utils.setupConfig();
|
||||||
|
|
||||||
require('coffee-script') // remove this once we've fully converted over
|
require('coffee-script') // remove this once we've fully converted over
|
||||||
var express = require("express");
|
var express = require("express");
|
||||||
@@ -8,18 +9,12 @@ var path = require("path");
|
|||||||
var domainMiddleware = require('domain-middleware');
|
var domainMiddleware = require('domain-middleware');
|
||||||
var swagger = require("swagger-node-express");
|
var swagger = require("swagger-node-express");
|
||||||
|
|
||||||
var utils = require('./utils');
|
|
||||||
var middleware = require('./middleware');
|
var middleware = require('./middleware');
|
||||||
|
|
||||||
var TWO_WEEKS = 1000 * 60 * 60 * 24 * 14;
|
var TWO_WEEKS = 1000 * 60 * 60 * 24 * 14;
|
||||||
var app = express();
|
var app = express();
|
||||||
var server;
|
var server;
|
||||||
|
|
||||||
// ------------ Setup configurations ------------
|
|
||||||
utils.setupConfig();
|
|
||||||
if (nconf.get('NODE_ENV') === 'production')
|
|
||||||
require('newrelic');
|
|
||||||
|
|
||||||
// ------------ MongoDB Configuration ------------
|
// ------------ MongoDB Configuration ------------
|
||||||
mongoose = require('mongoose');
|
mongoose = require('mongoose');
|
||||||
require('./models/user'); //load up the user schema - TODO is this necessary?
|
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") {
|
if (nconf.get('NODE_ENV') === "development") {
|
||||||
Error.stackTraceLimit = Infinity;
|
Error.stackTraceLimit = Infinity;
|
||||||
}
|
}
|
||||||
|
if (nconf.get('NODE_ENV') === 'production') require('newrelic');
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user