Hi all and thanks for your time and your help.
I need a simple example for use socket.io-redis, with comments please. I read the documentation, but I did not understand. Thank you,
Hi all and thanks for your time and your help.
I need a simple example for use socket.io-redis, with comments please. I read the documentation, but I did not understand. Thank you,
The socket.io-redis documentation don't mention you actually need to run a redis server so you might have forgotten that. The socket.io-redis plugin uses the pub/sub client of the redis server to connect multiple socket.io instances.
download and install a redis server from https://redis.io
add the redis plugin to your socket.io instances:
The 6379 is the default redis port, localhost if you run node and redis on the same server.
add socket.io and socket.io-redis functions you need
Start the server with socket.io