【发布时间】:2018-01-08 08:59:42
【问题描述】:
以下是我如何初始化和发出,但我没有发现任何错误,我的服务器也没有监听,接收任何事件。
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。
【问题讨论】:
标签: socket.io socket.io-1.0 socket.io-redis