I’ll introduce the policy of setting NODE_ENV only to production, development, and test.
I wanted to have a clear principle for NODE_ENV settings without hesitation, so I researched and wrote this article.
For NODE_ENV, I only set the following production, development, and test values:
I use test because Jest sets NODE_ENV=test by default.
NODE_ENVSet to ‘test’ if it’s not already set to something else.
Source: Environment Variables · Jest
That’s all from the Gemba about the policy of using only production, development, and test for NODE_ENV in Node.js.