Open Lenny-Hu opened 5 years ago
https://github.com/remy/nodemon
cnpm install -g nodemon
根目录下创建nodemon.json
nodemon.json
{ "restartable": "rs", "ignore": [ ".git", "node_modules/**/*" ], "verbose": true, "execMap": { "js": "node --harmony" }, "watch": [ ], "env": { "NODE_ENV": "development" }, "ext": "js json" }
nodemon app.js
如果使用cnpm安装后,一直报错 找不到模块,尝试删除node_modules,使用yarn安装再试
Node自动重启工具 nodemon
https://github.com/remy/nodemon
cnpm install -g nodemon
根目录下创建
nodemon.json
nodemon app.js