From b4cec71c03f6438c6f1035fbe09a8ccaafd5bc03 Mon Sep 17 00:00:00 2001 From: Alex Kern Date: Tue, 28 Jul 2015 22:53:20 -0700 Subject: [PATCH] Add New Relic. --- .gitignore | 6 ++---- index.js | 7 +++++++ package.json | 1 + 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index 15ba529..81928bc 100644 --- a/.gitignore +++ b/.gitignore @@ -30,7 +30,5 @@ node_modules/* # Compiled assets css/index.css -# Elastic Beanstalk Files -.elasticbeanstalk/* -!.elasticbeanstalk/*.cfg.yml -!.elasticbeanstalk/*.global.yml +# New Relic +newrelic.js diff --git a/index.js b/index.js index 5f0240f..4a6b650 100755 --- a/index.js +++ b/index.js @@ -1,5 +1,12 @@ #!/usr/bin/env node +try { + require('./newrelic') + require('newrelic') +} catch (ex) { + // Don't load New Relic if the configuration file doesn't exist. +} + require('babel/register')({ only: new RegExp(__dirname + '/lib' + '|' + __dirname + '/node_modules/filepizza') diff --git a/package.json b/package.json index e89f55a..d584cab 100644 --- a/package.json +++ b/package.json @@ -27,6 +27,7 @@ "filepizza-peerjs": "^1.0.0", "filepizza-socket": "^1.0.0", "morgan": "^1.5.2", + "newrelic": "^1.21.1", "nib": "^1.1.0", "node-uuid": "^1.4.3", "peer": "^0.2.8",