What is the current options available for reload in Node JS?

What are the current available options to reload the files in node js web application development – with or without restarting – i.e both

Couple of links are out-dated now

1. https://stackoverflow.com/questions/2925940/how-can-i-edit-on-my-server-files-without-
2. https://github.com/petruisfan/node-supervisor
3. https://github.com/kriszyp/nodules

Please advise


>Solution :

  1. Nodemon
npm install -g nodemon
# or
npm install --save-dev nodemon

nodemon your-app.js

Nodemon will watch for file changes and restart the server as needed.


npm install -g pm2
pm2 start your-app.js --watch

The –watch flag tells PM2 to watch for file changes.

Leave a Reply