cgarwood / mpc-control

Telnet and tablet interface for Martin M-PC, built for Lafayette Community Church
4 stars 5 forks source link

Adding auto-restart ability #7

Closed jay-oswald closed 6 years ago

jay-oswald commented 6 years ago

Adding auto-restart node processes, that starts the child service, and restarts it if it crashes.

Also added a autostart.bat file that runs this autorestart process, allowing it to be launched by running a bat file instead of typing a command

jay-oswald commented 6 years ago

At the moment if you run either the bat or the auto restart node script it doesn't log anything onto the console, except when the server starts and crashes.

I did this because I don't want the cmd window filling with polls, especially with variable heartbeat running with a min of 100ms or so, I plan to have the single script running for months at a time.

This can be modified if you want, but I figure if your actively testing then you can just run server directly and get the log outputting.

jay-oswald commented 6 years ago

The bat file could also easily run a git pull then npm update before it runs, so that it can get the latest update from github before it runs.

That pared with an automatic reboot of the script or pc (with bat in startup) could mean you could make changes during the week on github and have the lighting PC at church get the new version automatically