I've followed this tutorial on setting up a websocket to live update my website, which I've followed and it works fine, however, I need to keep a putty terminal open connected to my CentOS server for the command php bin/server.php
. How can I leave that command running constantly? Could I set it up as a service, or would I different approach be better?
EDIT: I've found using (from bin folder) php server.php &
will run the script in the background, so I can do other things via ssh, but if I close the connection it stops running.