Skip to content

Commit

Permalink
fixed 2x-to-3x issue
Browse files Browse the repository at this point in the history
  • Loading branch information
gabipurcaru committed Mar 21, 2013
1 parent 3344db4 commit dff3d5f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
8 changes: 5 additions & 3 deletions app.js
@@ -1,15 +1,17 @@
var express = require('express');
var http = require('http');
var User = require('./User').User;
var UserManager = require('./UserManager').UserManager;

var app = module.exports = express.createServer();
var io = require('socket.io').listen(app);
var app = module.exports = express();
var server = http.createServer(app);
var io = require('socket.io').listen(server);
io.configure(function () {
io.set("transports", ["xhr-polling"]);
io.set("polling duration", 10);
});
var port = process.env.PORT || 8000;
app.listen(port);
server.listen(port);

// Configuration

Expand Down
2 changes: 1 addition & 1 deletion package.json
Expand Up @@ -5,6 +5,6 @@
, "dependencies": {
"express": ">=2.3.11"
, "jade": ">= 0.0.1"
, "socket.io": "0.9"
, "socket.io": "0.9.13"
}
}

0 comments on commit dff3d5f

Please sign in to comment.