Restart node upon changing a file

后端 未结 8 718
轮回少年
轮回少年 2020-11-28 17:54

For someone who is coming from PHP background the process of killing node and starting it again after every code change, seems very tedious. Is there any flag when starting

8条回答
  •  春和景丽
    2020-11-28 18:28

    A good option is Node-supervisor and Node.js Restart on File Change is good article on how to use it, typically:

     npm install supervisor -g
    

    and after migrating to the root of your application use the following

     supervisor app.js
    

提交回复
热议问题