I am developing an ExpressJS application. I use pm2 to download it:
myapp$ pm2 start bin/www
This works fine, except that adding the --watch flag --watch not work; every time I change the source of JS, I need to explicitly restart it for the changes to take effect:
myapp$ pm2 restart www
What am I doing wrong? I tried the --watch flag with a non-ExpressJS application and it worked as expected.
source share