I've created a file called .elasticbeanstalk/environment.config with the following in it:
option_settings:
- option_name: NODE_ENV
value: development
I'm also passing the process.env.NODE_ENV to the view so I can 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" which is what I've set it to. When I deploy to Amazons Elastic Beanstalk via $ git aws.push
the value is empty.
Is there anything else I need to do for EB to recognise the NODE_ENV setting?