문제

Sometimes my socket.io server crashes. Until I find a solution I want to automatically restart it. Is it possible to create a crontab or something (linux) which checks every 10 seconds if the server is still running and if not starts it?

Thanks!

도움이 되었습니까?

해결책

I'd say it will be easier to just use forever

$ [sudo] npm install forever -g

you may have to daemonize it though... google according to your OS.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top