Skip to content

Instantly share code, notes, and snippets.

@jaouadballat
Last active April 4, 2018 19:52
Show Gist options
  • Save jaouadballat/6971f3b8832dc677aa259c602d2ab1f9 to your computer and use it in GitHub Desktop.
Save jaouadballat/6971f3b8832dc677aa259c602d2ab1f9 to your computer and use it in GitHub Desktop.
const express = require('express');
const app = express();
const server = app.listen(3001, function() {
console.log('server running on port 3001');
});
const io = require('socket.io')(server);
io.on('connection', function(socket) {
console.log(socket.id)
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment