mirror of
https://github.com/goldbergyoni/nodebestpractices.git
synced 2025-11-01 18:46:54 +08:00
[Chinese-translation]README.chinese.md - add 5.15.
This commit is contained in:
@ -629,14 +629,14 @@ All statements above will return false if used with `===`
|
||||
<br/><br/>
|
||||
|
||||
|
||||
## ![✔] 5.15. Set NODE_ENV=production
|
||||
## ![✔] 5.15. 设置NODE_ENV=production
|
||||
|
||||
**TL;DR:** Set the environment variable NODE_ENV to ‘production’ or ‘development’ to flag whether production optimizations should get activated – many NPM packages determining the current environment and optimize their code for production
|
||||
**TL;DR:** 设置环境变量NODE_ENV为‘production’ 或者 ‘development’,这是一个是否激活上线优化的标志 - 很多NPM的包通过它来判断当前的环境,据此优化生产环境代码。
|
||||
|
||||
**Otherwise:** Omitting this simple property might greatly degrade performance. For example, when using Express for server side rendering omitting NODE_ENV makes the slower by a factor of three!
|
||||
**否则:** 遗漏这个简单的属性可能大幅减弱性能。例如,在使用Express作为服务端渲染页面的时候,如果未设置NODE_ENV,性能将会减慢大概三分之一!
|
||||
|
||||
|
||||
🔗 [**Read More: Set NODE_ENV=production**](/sections/production/setnodeenv.md)
|
||||
🔗 [**更多: 设置NODE_ENV=production**](/sections/production/setnodeenv.md)
|
||||
|
||||
|
||||
<br/><br/>
|
||||
|
||||
Reference in New Issue
Block a user