From d554af189b168dcd82a80f7297b4d3f11e9dcf16 Mon Sep 17 00:00:00 2001 From: Harvey Kandola Date: Thu, 16 Jun 2016 09:12:33 -0700 Subject: [PATCH 1/3] undefined check for intercom --- app/config/environment.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/config/environment.js b/app/config/environment.js index 0d771217..000cbbfd 100644 --- a/app/config/environment.js +++ b/app/config/environment.js @@ -35,8 +35,8 @@ module.exports = function(environment) { } }; - process.argv.forEach(function(element){ - if (element !== 'undefined') { + process.argv.forEach(function(element) { + if (element !== undefined) { if (element.startsWith("intercom=")) { element = element.replace("intercom=", ""); ENV.APP.intercomKey = element; From 12db5fe0aea7ec1b3700fe8c1ea70a4d3a5b178d Mon Sep 17 00:00:00 2001 From: Harvey Kandola Date: Thu, 16 Jun 2016 10:07:41 -0700 Subject: [PATCH 2/3] localhost --- app/config/environment.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/config/environment.js b/app/config/environment.js index 000cbbfd..591c564f 100644 --- a/app/config/environment.js +++ b/app/config/environment.js @@ -52,7 +52,7 @@ module.exports = function(environment) { }; ENV.apiHost = "https://localhost:5001"; - ENV.apiHost = "https://demo1.dev:5001"; + // ENV.apiHost = "https://demo1.dev:5001"; } if (environment === 'test') { From f988123a6419b45bd24259809927dadaaada87ab Mon Sep 17 00:00:00 2001 From: Harvey Kandola Date: Thu, 16 Jun 2016 10:15:10 -0700 Subject: [PATCH 3/3] apiHost now command line parameter to ember --- app/config/environment.js | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/app/config/environment.js b/app/config/environment.js index 591c564f..661b1329 100644 --- a/app/config/environment.js +++ b/app/config/environment.js @@ -35,15 +35,6 @@ module.exports = function(environment) { } }; - process.argv.forEach(function(element) { - if (element !== undefined) { - if (element.startsWith("intercom=")) { - element = element.replace("intercom=", ""); - ENV.APP.intercomKey = element; - } - } - }); - if (environment === 'development') { ENV.APP.LOG_TRANSITIONS = true; ENV.APP.LOG_TRANSITIONS_INTERNAL = true; @@ -52,7 +43,6 @@ module.exports = function(environment) { }; ENV.apiHost = "https://localhost:5001"; - // ENV.apiHost = "https://demo1.dev:5001"; } if (environment === 'test') { @@ -83,6 +73,19 @@ module.exports = function(environment) { ENV.apiHost = ""; } + process.argv.forEach(function(element) { + if (element !== undefined) { + if (element.startsWith("intercom=")) { + element = element.replace("intercom=", ""); + ENV.APP.intercomKey = element; + } + if (element.startsWith("apiHost=")) { + element = element.replace("apiHost=", ""); + ENV.apiHost = element; + } + } + }); + ENV.apiNamespace = "api"; ENV.contentSecurityPolicy = null;