The Guide provides an example in ES6 for reading variables out of the environment.js file:
https://guides.emberjs.com/v2.5.0/configuring-ember/configuring-your-app/
However, I want to use one of the values in ENV.APP in a plain old .js file. Specifically, I want to dynamically set an http-proxy target server depending on the environment.
In /server/proxies/api.js I added this code at the top:
var proxyConfig = require('./../../config/environment.js');
console.log( 'Proxy Config: ' + JSON.stringify(proxyConfig, null, 2) );
I get this as the output:
Proxy Config: undefined
How can I access ENV.APP settings in regular JavaScript files?