Ok, I'm new to node, and actually just using node server to serve static js, but I can't find any information about this anywhere.
I run the application the ember application suite that is created for node server.js to be deployed, and heroku runs it with node server.js .
It uses grunt to create, test, etc.
I would like to know how I can specify configuration variables (i.e. authentication tokens) that can be overridden by heroku configuration variables.
The closest I could get is a user task that reads environment variables and writes a json file that is embedded in the site (and assigned to the global var). This works locally, but does not take into account the configuration of heroku.
I even wrote a deployment script that receives the heroku configurations, exports them as environment variables locally, and makes an assembly - which works, but the configurations are only updated in the deploy application. Therefore, if I do heroku config:add CONFIG_TEST=test_value , my application does not see this value for CONFIG_TEST until the next time I deploy the application.
I would like my application to immediately enable this configuration value in the JS browser.
How to do this with node, how is my application configured?
source share