Skip to content

Commit

Permalink
Update for compatibility with Express 3.1
Browse files Browse the repository at this point in the history
Express 3.x does not return an http server instance, and this is the
updated method for doing the same thing.
  • Loading branch information
benmurden committed Feb 13, 2013
1 parent e92cc42 commit 7bdf5c7
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions app.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
var app = require('express').createServer()
var io = require('socket.io').listen(app);
var express = require('express')
, app = express()
, http = require('http')
, server = http.createServer(app)
, io = require('socket.io').listen(server);

app.listen(8080);
server.listen(8080);

// routing
app.get('/', function (req, res) {
Expand Down

0 comments on commit 7bdf5c7

Please sign in to comment.