Closed josx closed 7 years ago
What are you needing that process.env.NODE_ENV
doe not provide?
Yes, I know that is what i want. But i think it is usefull to have it the configuration module, so we can do app.get('env') or something like that.
I'm not sure I get the advantage of app.get('env')
over the obvious process.env.NODE_ENV
.
You can actually achieve this with the current module. In your config, do this:
{
"env": "NODE_ENV"
}
That should do the trick. It will read the NODE_ENV environment variable and make it available at app.get('env')
Ok, will do it this way.
I think it is usefull to know which enviroment is loaded. Example for doing something in default or development mode. (not using directly env vars in node). @daffl what do you think about?