简体   繁体   中英

NODE_ENV variable in Node.js

I am a beginner in Node and I see the following code in my project:

process.env.NODE_ENV

What is NODE_ENV and how can I get access to it or change it? It seems to pick up some values but don't know from where is it getting picked up.

Please let me know.

NODE_ENV环境变量的名称,您可以在shell中访问和更改它,例如: export NODE_ENV=development ,可以在运行进程时进行更改,例如: NODE_ENV=production node application.js ,也可以对其进行更改在您的Shell的配置文件之一中

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM