When developing the HTTP application implemented by node. JS, you will find that no matter how you modify that line of code, you must terminate the Nodejs and re-run it to be effective. This is because Nodejs only parses the script file the first time it is referenced to a part, and then accesses the memory directly, avoiding repeated loading. This design of NODEJS, while improving performance, is not conducive to the development of debugging, because we always want to see the effect in the development process immediately, instead of terminating the process and restarting it every time.
Supervisor can help you implement this feature, he will monitor your changes to the code, and automatically restart the Nodejs, using a simple method, first use NPM installation supervisor:
NPM install-g Supervisor
If you are a Linux or MAC, typing the above command directly is likely to have a permissions error because NPM needs to install supervisor to the system directory and requires administrator authorization to install it using the sudo npm install-g Supervisor command.
Next, use the Supervisor command to start App.js (the JS file for your HTTP request)
Supervisor App.js
The supervisor gadget can solve debugging problems in development.