Restart node upon changing a file

后端 未结 8 745
轮回少年
轮回少年 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:18

    node-dev

    node-dev is great alternative to both nodemon and supervisor for developers who like to get growl (or libnotify) notifications on their desktop whenever the server restarts or when there is an error or change occur in file.

    Installation:

    npm install -g node-dev
    

    Use node-dev, instead of node:

    node-dev app.js
    

    Notification on Changing file so server start automatically

    console out put

提交回复
热议问题