Last active
August 29, 2015 13:56
-
-
Save euoia/9255618 to your computer and use it in GitHub Desktop.
Simple socket.io server example
This file contains hidden or 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
var Socketio = require('socket.io'), | |
http = require('http'); | |
var port = 3000; | |
// Create the HTTP server. | |
var server = http.createServer().listen(port, function() { | |
console.log("HTTP server listening on port %d.", port); | |
}); | |
// Create the socket.io server. | |
var socketio = Socketio.listen(server); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment