changed web.js to app.js

This commit is contained in:
Rob Dodson 2012-06-04 22:54:10 -07:00
parent b3035dba55
commit a9d774fc17
2 changed files with 9 additions and 2 deletions

1
Procfile Normal file
View File

@ -0,0 +1 @@
web: node app.js

10
app.js
View File

@ -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);
});