目录
- 起步
- 使用
nodemon
作用就是实时更新,不用每次都运行一个node <filename>
了
起步
npm i -g nodemon
使用
nodemon <filename>
举个例子:
// 00.js
console.log("test")
nodemon .\00-parpare.js
# [nodemon] 2.0.4
# [nodemon] to restart at any time, enter `rs`
# [nodemon] watching path(s): *.*
# [nodemon] watching extensions: js,mjs,json
# [nodemon] starting `node .\00-parpare.js`
# test ------>输出结果
修改00.js,无需重启
console.log("test123")
# [nodemon] clean exit - waiting for changes before restart
# [nodemon] restarting due to changes...
# [nodemon] starting `node .\00-parpare.js`
# test123 ------>输出结果
# [nodemon] clean exit - waiting for changes before restart
**粗体** _斜体_ [链接](http://example.com) `代码` - 列表 > 引用
。你还可以使用@
来通知其他用户。