2.4.2 在节点之间传递事件
const io = require('socket.io')(3000)
const redis = require('socket.io-redis');
io.adapter(redis({host:"localhost",port:6379}));io.emit('hi',"all sockets")Last updated
Was this helpful?
const io = require('socket.io')(3000)
const redis = require('socket.io-redis');
io.adapter(redis({host:"localhost",port:6379}));io.emit('hi',"all sockets")Last updated
Was this helpful?
Was this helpful?