Skip to content

Instantly share code, notes, and snippets.

@zgramana
Last active January 4, 2016 20:19
Show Gist options
  • Save zgramana/8673162 to your computer and use it in GitHub Desktop.
Save zgramana/8673162 to your computer and use it in GitHub Desktop.
Test Node + Express server.
curl http://localhost:3000/socket.io/1
var app = require('express')();
var server = require('http').Server(app);
var io = require('socket.io').listen(server);
io.on('connection', function(socket){
console.log("woo hoo");
socket.on('event', function(data){});
socket.on('disconnect', function(){});
});
server.listen(3000);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment