Solve the problem that nodejs frequently modifies the code and needs to restart the server frequently

nodemon can help us frequently modify the code to restart the server. nodemon is a third-party command line tool developed based on Node.js, it needs to be installed separately when using it

npm install --global nodemon

use

# 使用方式和node一样
nodemon practice.js
# 等价于
node practice.js

nodemon will automatically monitor whether the code of the current project is modified, and automatically restart the service

Guess you like

Origin blog.csdn.net/chen__cheng/article/details/114784323