How to start node app with development flag?

前端 未结 5 558
梦如初夏
梦如初夏 2021-02-07 05:41

At top of my app.js file I put

NODE_ENV=\'development\';

but I get error that NODE_ENV is not defined. But in the nodejs documentation is says

5条回答
  •  滥情空心
    2021-02-07 06:00

    NODE_ENV is an environment variable.
    You set it in your shell when you invoke Node.js.

    However, development is the default; you only need to do anything if you want prod.

提交回复
热议问题