I'm using socket.io for building the real-time dashboard,
I want to send data to each connection as separate,
How to achieve this functionality in node.js using socket.io?
io.emit('someEvent', {data: 'data'});
I'm using socket.io for building the real-time dashboard,
I want to send data to each connection as separate,
How to achieve this functionality in node.js using socket.io?
io.emit('someEvent', {data: 'data'});
Use the following method to emit to particular socket.id
io.sockets.connected[socket.id].emit('even', {
data: `successfully fetched dat for user ${reqUser.user.userName}.`
});