下面是我如何初始化和发出,但我没有发现任何错误,我的服务器也没有监听,接收任何事件。
const io = require('socket.io-emitter')({
host: 127.0.0.1,
// path: do i need this ?
port: redisUri.port,
pub: pub, // is the key required to be the same as the app ?
sub: sub, // is the key required to be the same as the app ?
});
io.emit('test', 'test'})
我尝试了很多变化,有人可以启发我如何调试这个吗?
我也尝试在对象之前添加一个 redis href。