Skip to content
This repository was archived by the owner on Aug 18, 2021. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 1 addition & 4 deletions app.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
require('newrelic');
const bodyParser = require('body-parser');
const compression = require('compression');
const getConfig = require("./config");
Expand Down Expand Up @@ -107,10 +108,6 @@ app.use(function(err, req, res) {

// start the server, but only if we're not in the middle of a test
if(!module.parent) {
if(config.prod_envs.includes(process.env.NODE_ENV)) {
require('newrelic');
}

app.listen(config.PORT, () => logger.info(`Started API server at http://0.0.0.0:${config.PORT}/`));
}

Expand Down
2 changes: 1 addition & 1 deletion newrelic.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ exports.config = {
/**
* Array of application names.
*/
app_name: ['code-api-dev', 'code-api-staging', 'code-api'],
app_name: [process.env.NEW_RELIC_APP_NAME, 'code-api'],
/**
* Your New Relic license key.
*/
Expand Down