socketio / socket.io-redis-emitter

The Socket.IO Redis emitter, allowing to communicate with a group of Socket.IO servers from another Node.js process.
https://socket.io/docs/v4/redis-adapter/
MIT License
721 stars 121 forks source link

How to use this library? #81

Closed agoenks29D closed 3 years ago

agoenks29D commented 5 years ago

i have run npm install socket.io-emitter --save

and try connect to server :

var io = require('socket.io-emitter')({ host: '127.0.0.1', port: 8081});
setInterval(function(){
  io.emit('time', new Date);
}, 5000);

and showing this error :

image

when i try to install any package,i got problem :

image

this library for client side or server side?

KristjanTammekivi commented 5 years ago

This library is for server side

darrachequesne commented 3 years ago

This library is indeed intended for server side usage. I've updated the README to make it clearer.