使用supervisor

livereolad

  • nodemon
  • supervisor
  1. npm i -S supervisor

修改package.json

  1. "scripts": {
  2. "start": "./node_modules/.bin/supervisor bin/www"
  3. },

然后

  1. npm start

改一下routes里的代码试试,你再也不要重启了