Skip to content
Browse files

changed for express 2.x -> 3.x

  • Loading branch information...
1 parent 8d8c793 commit 4d9f56eb70a1846064895c52565c91cfd495deb8 @algesten committed Feb 23, 2013
Showing with 6 additions and 6 deletions.
  1. +6 −6 web.js
View
12 web.js
@@ -4,6 +4,7 @@ var config = require('./server-config.json');
var logger = require('./modules/logger.js');
var express = require('express');
+var http = require('http');
var io = require('socket.io');
// XXX hardcoded CLOUDANT
@@ -20,11 +21,12 @@ nano.db.get(config.db_name, function (err, body) {
}
});
-// create express server
-var app = express.createServer();
+// create express app/server
+var app = express();
+var server = http.createServer(app);
// connect socket.io to express
-io = io.listen(app);
+io = io.listen(server);
// configure socket.io
// assume CLOUDANT_URL also implies heroku
@@ -51,7 +53,7 @@ var port = process.env.PORT || config.port;
console.log('express port: ' + port);
-app.listen(port);
+server.listen(port);
// db and dao global objs
var db;
@@ -79,5 +81,3 @@ var con;
}
});
})();
-
-

0 comments on commit 4d9f56e

Please sign in to comment.
Something went wrong with that request. Please try again.