Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
io.on("connection", function(socket) {
console.log('A user connected');
socket.emit('message', { message: 'welcome to the chat' });
socket.on('send:message', function(data) {
console.log(data);
socket.emit('message', data);
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.