How to configure Socket.io & Redis servers to run without terminal window being open
Hello there,
I have followed this guide[1] to configure Socket.io and Redis with Laravel to send notifications in real-time. However, It's clear that I need to keep the terminal window open so that Socket.io & Redis servers will stay running. If I close these windows at anytime the notifications/events will not be sent.
So, How to make these commands run in the background?
FYI, I have already come up with (Supervisord.org) that will make this run in the background, I installed it and it works fine (i think).
However, I didn't know where to start and how to configure it to run Socket.io & Redis servers.
Please if you have any (step by step guide) for that it will be helpful. Thanks.
For Redis it should be enough to config it as a daemon:
Set 'daemonize yes' in its config file then reload redis. Or run it as 'redis-server --daemonize yes'
For socket.io you can use a process manager like forever or pm2. Both come with install instructions.