At top of my app.js file I put
NODE_ENV='development';
but I get error that NODE_ENV is not defined. But in the nodejs documentation is says NODE_ENV is global. How can I start my app with development settings? Thank you.
It is better to start your app in dev mode like this:
NODE_ENV=development node app.js
But if you really wanted to set it your app file just set it like this:
process.env.NODE_ENV= "development"
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With