Last active
February 14, 2018 15:29
-
-
Save pchinjr/046db80351ea43774cf76d5fd9dc6caa to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Server Side Code | |
const io = require('socket.io')(server); | |
io.on('connection', function(socket) { | |
console.log('Your socket id is', socket.id); | |
socket.on('eventName', function doSomething() { | |
console.log('executing doSomething') | |
}) | |
}); | |
//Client Side Code | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment