【笔记】nodemon学习笔记

前言

nodemon is a tool that helps develop Node.js based applications by automatically restarting the node application when file changes in the directory are detected.

Nodejs中通过Nodemon模块,实现每当代码改动自动重新运行.js文件

下载依赖

1
npm install -g nodemon

该用Nodemon启动代码

  • 从原本的使用node <file>.js启动nodejs项目改为使用nodemon <file>.js启动项目

<file>.js:JS文件

1
nodemon <file>.js

完成

参考文献

哔哩哔哩——黑马程序员