【发布时间】:2020-06-18 14:57:26
【问题描述】:
我正在尝试使用 Socket.io 和 Socket.Io-redis。 我已经启动并运行了我的 Redis 服务器。 启动 Socket.Io 服务器时出现的错误是: 回复错误:ERR 未知命令 'pubsub' 我完全不知道为什么会出现这个错误。
我使用的 Redis 版本是 2.4.5
io.adapter(redisIO({host: 'localhost', port: 6379}));
io.of('/').adapter.clients((err, clients) => {
if(err){
console.log('error!!')
throw err;
}
【问题讨论】:
标签: node.js redis windows-10 node-cluster socket.io-redis