ember.js - EmberCLI - Determining environment from request early in the page lifecycle -


i have embercli app staging , prod both live on same s3 bucket, , in config/environment.js environment variable same. still need able specify different settings 2 "environments".

the surefire way tell app running inspecting domain of request, i'm having trouble intercepting enough update settings.

i've tried creating initializer inspect domain , update env object accordingly, seems it's late in page lifecycle have effect; page has been rendered, , addons not see proper settings.

for 1 addon, had copy of code project , edit index.js file use proper keys based on domain, it's unwieldy. there better way this? trying make architecture work ill-advised?

any advice more versed in ember appreciated.

there's not great way handle staging environments right (see stefan penner's comment here).

that said think can achieve staging environment on s3 using ember-cli-deploy if add staging environment ember-cli-deploy config. , handle difference between staging , production in ember-cli-build.js.


Comments

Popular posts from this blog

sublimetext3 - what keyboard shortcut is to comment/uncomment for this script tag in sublime -

java - No use of nillable="0" in SOAP Webservice -

ubuntu - Laravel 5.2 quickstart guide gives Not Found Error -