Auto-refresh NodeJS apps, with Nodemon

I really enjoying working with NodeJS but it can also get quickly tedious due to the continuous need to stop and restart the server after any editing.

Luckily we do not necessarily need to. A small package called Nodemon can take care of this part for us. You can install it directly via npm, and since you may end up using it on every project I would install it globally.

sudo npm i -g nodemon

The command line above install the nodemon package globally (therefore you may need the sudo prefix). Done that you can now to start your server app with nodemon instead of the classic node command to take advantage of the auto-refresh feature.

nodemon app.js

You can read more about the Nodemon package for NodeJS at the following links.