I created a file called .elasticbeanstalk / environment.config with the following:
option_settings:
- option_name: NODE_ENV
value: development
I also pass process.env.NODE_ENV to the view to check the value
app.get('/', function(req, res) {
var data = {
env: process.env.NODE_ENV
}
res.render('upload',data);
});
On my local machine, I get the value "local" to which I installed it. When I deploy to Amazons Elastic Beanstalk through $ git aws.push, the value is empty.
Is there anything else I need for EB to recognize the NODE_ENV setting?
source
share