How do I pass environment variables from bashrc to Ember CLI. I imagine a situation where you need stripe api keys or pusher api-keys and you have them in your environment v
I want to make sure that my API keys are not checked in. As part of the build process, I copy a local config file to the config
directory and load it into environment.js
In environment.js
try {
var local = require('./local_environment');
Object.keys(local.config).forEach(function(key) {
ENV[key] = local.config[key];
});
} catch(err) {
console.log("config/local_environment.js not found");
}
In local_environment.js
(not checked in, copied by build process)
exports.config = {
SOME_API_KEY: 'key_here'
};