Automatically reload files in NodeJS

2

I am working on a project with NodeJS , and I just realized that I must restart the server every time I make my changes, is there any way to avoid this?

I am working with NodeJS 6.10 , express 4.13 , gulp 3.9 , npm 3.10 .

    
asked by jvilla8a 04.07.2017 в 16:06
source

1 answer

4

A good alternative to using a supervisor is nodemon :

  

Monitor your node.js application and automatically restart the server- Ideal to develop

To use nodemon :

$ npm install nodemon -g
$ nodemon app.js

Another option is to use node-dev

npm install node-dev

This tool even gives a notification when the server reloads and will give a success or error message.

to start node-dev you must execute the following line:

node-dev app.js

community response from stackoverflow in English

    
answered by 04.07.2017 / 16:35
source