星期三, 10月 11, 2017

[node.js] 如何切換development與production模式

有關node.js處理NODE_ENV來切換developer/production的方法種類

export NODE_ENV=production
Or if you are in windows you could try this:
SET NODE_ENV=production
or you can run your app like this:
NODE_ENV=production node app.js
You can also set it in your js file:
process.env.NODE_ENV = 'production';
https://stackoverflow.com/questions/9198310/how-to-set-node-env-to-production-development-in-os-x

沒有留言:

張貼留言

留個話吧:)

其他你感興趣的文章

Related Posts with Thumbnails