Answer the question
In order to leave comments, you need to log in
How to change process.env values to production defaults?
There is a node express application, I want to assign production values to env. Where is the value of this variable generally stored?
I know you can specify in pakage.json:
"scripts": {
"start": "NODE_ENV=production ..."
Answer the question
In order to leave comments, you need to log in
This is the value of the environment variable. For unixes here: www.cyberciti.biz/faq/set-environment-variable-unix , for Windows via GUI.
To set the variable when launching via forever, you can add the script to package.json:
"forever": "NODE_ENV=production forever app.js".
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question