Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

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-
   restarting-nodejs-when-i-want-to-see-t
2. https://github.com/petruisfan/node-supervisor
3. https://github.com/kriszyp/nodules

Please advise

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

Thanks

>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.

2.pm2

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

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

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading