diff --git a/Procfile b/Procfile new file mode 100644 index 0000000..e1d4131 --- /dev/null +++ b/Procfile @@ -0,0 +1 @@ +web: node app.js diff --git a/app.js b/app.js index 8ecffd1..212c907 100644 --- a/app.js +++ b/app.js @@ -1,5 +1,5 @@ var express = require('express'), - app = express.createServer(), + app = express.createServer(express.logger()), io = require('socket.io').listen(app), routes = require('./routes'); @@ -22,9 +22,15 @@ app.configure('production', function() { app.use(express.errorHandler()); }); +io.configure(function () { + io.set("transports", ["xhr-polling"]); + io.set("polling duration", 10); +}); + // Routes -app.listen(3000, function() { +var port = process.env.PORT || 5000; +app.listen(port, function() { console.log("Express server listening on port %d in %s mode", app.address().port, app.settings.env); });