Repository: incubator-trafficcontrol
Updated Branches:
  refs/heads/master dd3887358 -> c03453d8c


only use connect-livereload in dev mode


Project: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/repo
Commit: 
http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/commit/ad581766
Tree: 
http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/tree/ad581766
Diff: 
http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/diff/ad581766

Branch: refs/heads/master
Commit: ad581766223c3ee369328c29ae9364c09080091f
Parents: c2d55c7
Author: Jeremy Mitchell <mitchell...@gmail.com>
Authored: Mon Apr 10 10:59:08 2017 -0600
Committer: Dewayne Richardson <dewr...@apache.org>
Committed: Mon Apr 10 11:11:57 2017 -0600

----------------------------------------------------------------------
 traffic_ops/experimental/ui/conf/config.js |  2 +-
 traffic_ops/experimental/ui/server.js      | 12 ++++++++----
 2 files changed, 9 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/blob/ad581766/traffic_ops/experimental/ui/conf/config.js
----------------------------------------------------------------------
diff --git a/traffic_ops/experimental/ui/conf/config.js 
b/traffic_ops/experimental/ui/conf/config.js
index 9666739..d1b1358 100644
--- a/traffic_ops/experimental/ui/conf/config.js
+++ b/traffic_ops/experimental/ui/conf/config.js
@@ -17,7 +17,7 @@
  * under the License.
  */
 
-// this is the config that is consumed by server.js when running in dev mode
+// this is the config that is consumed by server.js
 module.exports = {
     timeout: '120s',
     useSSL: false, // set to true if using ssl

http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/blob/ad581766/traffic_ops/experimental/ui/server.js
----------------------------------------------------------------------
diff --git a/traffic_ops/experimental/ui/server.js 
b/traffic_ops/experimental/ui/server.js
index 002ab61..5bdeee3 100644
--- a/traffic_ops/experimental/ui/server.js
+++ b/traffic_ops/experimental/ui/server.js
@@ -57,10 +57,14 @@ app.use(morgan('combined', {
 app.use(errorhandler());
 app.use(timeout(config.timeout));
 
-app.use(require('connect-livereload')({
-    port: 35728,
-    excludeList: ['.woff', '.flv']
-}));
+if (app.get('env') === 'dev') {
+    app.use(require('connect-livereload')({
+        port: 35728,
+        excludeList: ['.woff', '.flv']
+    }));
+} else {
+    app.set('env', 'production');
+}
 
 // Enable reverse proxy support in Express. This causes the
 // the "X-Forwarded-Proto" header field to be trusted so its

Reply via email to