npm run dev 修改后自动重启服务器

"scripts": {
"dev": "supervisor index"
},

Running node-supervisor with
program 'index'
--watch '.'
--extensions 'node,js'
--exec 'node'

Starting child process with 'node index'
Watching directory 'C:\wamp\www\zhang\3jd\day1\router' for changes.
Press rs for restarting the process.

 

转载于:https://www.cnblogs.com/shenlan88/p/11070035.html