nodemon not working properly

You're running express 4, which has the app.listen call in a different file than app.js. The command you're looking for is nodemon bin/www (localhost and 3000 are not needed in this scenario).

In fact, you can even run nodemon with no args, and it'll read what command needs to be run from scripts.start in package.json (which express generates automatically).


Here's what I did to make nodemon update correctly:

nodemon index.js -L

The -L flag stands for legacyWatch, here's an explanation from the official doc:

In some networked environments (such as a container running nodemon reading across a mounted drive), you will need to use the legacyWatch: true which enables Chokidar's polling.

https://www.npmjs.com/package/nodemon#application-isnt-restarting