This is probably a silly question, but I can't find a straight answer anywhere, so I rather ask it than continue to have this doubt.
I'm reading about setting Node environment. The answer to this question says we shouldn't set NODE_ENV from within a node application itself.
So, what I understand is we set through the OS, like this:
- linux & mac: export NODE_ENV=development
- windows: set NODE_ENV=development
But when we deploy it, say to Heroku or AWS, and we want to change it to production, where do we make that change? Is it automatic (the servers on Heroku or AWS already have it set to production?)
As I said, probably silly question. But documentations seems to be written for people who already know how to use it.