http://pm2.keymetrics.io/docs/usage/watch-and-restart/#auto-restart-apps-on-file-change根据这里的方法,只须要把pm2的服务先停下,而后起来的时候带上--watch就能够了app
pm2
--watch