jeudi 19 février 2015

Node Restart in Shell Script

I want to rerun the node server, whenever there's changes in file, but i want to use fswatch. i am using fswatch with the shell script like



nohup node server.js &


but i can't run the same script again since it will throw EADDRINUSE.



  • whats the best way to restart the node via script with the help of fswatch (or alternate, without any new installation) ?

  • Why node doesn't have something like node restart?


what i could think of is get pid from ps and kill it with script, but i guess there should be a better solution.


Aucun commentaire:

Enregistrer un commentaire