我刚开始使用node。现在,每当我使用npm install -g nodemon
启动服务器时,我都使用命令nodemon server.js
安装了nodemon,它可以正常运行,但是当我对代码进行一些更改时,它只会继续重新启动不执行命令的服务器。文件中的代码,因此不会保存我的进度。
Ansh@LAPTOP-7QQ43AM7 MINGW64 /f/files/atom/Web Development/my-express-server
$ nodemon server.js
[nodemon] 1.19.0
[nodemon] to restart at any time, enter `rs`
[nodemon] watching: *.*
[nodemon] starting `node server.js`
Server has started on port 3000
[nodemon] restarting due to changes...
[nodemon] restarting due to changes...
[nodemon] restarting due to changes...
它不会在重新启动后再次启动服务器,而是停留在重新启动过程中