Don’t need to restart your Node server again and again?

While doing development on any NodeJS application, whenever we make any change to some file we need to restart our Node server from the command prompt/terminal. This is a repetitive process since we make hundred of changes and restart server every time to check the change.

Solution to this issue is using a tool called nodemon. It will continuously check your files for any changes and will restart the server itself if it detects any change.

nodemon can be installed using following command.

npm install nodemon -g

After the successful installation you can use nodemon app.js (you file name) rather than node app.js in your command prompt and it will keep monitoring file for any change.


Related Posts