本文作者: jsweibo
本文链接: https://jsweibo.github.io/2019/07/30/%E4%BB%80%E4%B9%88%E6%98%AFnodemon/
摘要
本文主要讲述了:
- 作用
- 安装
- 示例
正文
作用
监听项目文件变更并重启 nodejs 应用。
安装
局部安装
1 |
|
示例
learn_nodemon/package.json
1 | { |
learn_nodemon/nodemon.json
1 | { |
learn_nodemon/index.js
1 | const http = require('http'); |
运行:
1 |
|
当 CWD 下的index.js变更时,nodemon 会结束原先的 nodejs 进程并执行node index.js。
参考资料
本文作者: jsweibo
本文链接: https://jsweibo.github.io/2019/07/30/%E4%BB%80%E4%B9%88%E6%98%AFnodemon/
本文对你有帮助?请支持我
- 本文链接: https://jsweibo.github.io/2019/07/30/%E4%BB%80%E4%B9%88%E6%98%AFnodemon/
- 版权声明: 除非另有说明,否则本网站上的内容根据署名-非商业性使用-相同方式共享 4.0 国际 (CC BY-NC-SA 4.0) 进行许可。