From f988123a6419b45bd24259809927dadaaada87ab Mon Sep 17 00:00:00 2001 From: Harvey Kandola Date: Thu, 16 Jun 2016 10:15:10 -0700 Subject: [PATCH] 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;