There is a lot of information on the role, installation and use of supervisor on the Internet, and we do not introduce it here.
Git address: https://github.com/petruisfan/node-supervisor
The main point here is to use Supervisor to ignore the file:
After executing Supervisor index, node restarts as soon as there is a file change in the entire directory file.
Now you want to ignore the update of the folder views, that is, node does not restart when you change the file under the Views folder. Execute command:
Supervisor-i views Index
After executing the command, it is found that the change of the file under the views can still trigger node restart, and modify the execution command to:
Supervisor-i Views,.git Index
Changing the file under the Views folder at this time does not trigger node restart. Reason:
Item is pulled down with Gitlab, there are. git files, only ignore Views folder, because the Views folder under the changes in the file will affect. git, so although the views are ignored, but the. git file has changed, so the node restart is still triggered.