Permalink
Browse files

updates for express 3.x

  • Loading branch information...
1 parent f314cb3 commit 4ae0be86bbefe96ede2aa49043fe4fe0fbbbed80 @cgack committed Dec 31, 2012
Showing with 5 additions and 3 deletions.
  1. +5 −3 app.js
View
8 app.js
@@ -1,6 +1,8 @@
var express = require("express"),
- app = express.createServer(),
- io = require("socket.io").listen(app),
+ app = express(),
+ http = require("http"),
+ server = http.createServer(app),
+ io = require("socket.io").listen(server),
ply = require("./player.js"),
gm = require("./game.js"),
dck = require("./deck.js"),
@@ -13,7 +15,7 @@ io.configure(function() {
/* ACCORDING THE HEROKU WE DON'T NEED THIS io.set('log level', 1); */
});
-app.listen(process.env.PORT); //8080
+server.listen(process.env.PORT || 8080); //8080
app.get("/", function( req, res ) {
res.sendfile(__dirname + "/index.html");

0 comments on commit 4ae0be8

Please sign in to comment.