|
|
|
@ -5,6 +5,7 @@
|
|
|
|
|
|
|
|
|
|
var express = require('express'); |
|
|
|
|
var round = require('./routes/round'); |
|
|
|
|
var database = require('./routes/database'); |
|
|
|
|
var http = require('http'); |
|
|
|
|
var path = require('path'); |
|
|
|
|
var cons = require('consolidate'); |
|
|
|
@ -31,7 +32,7 @@ app.use(app.router);
|
|
|
|
|
app.use('/static', express.static(path.join(__dirname, 'public'))); |
|
|
|
|
|
|
|
|
|
// development only
|
|
|
|
|
if ('development' == app.get('env')) { |
|
|
|
|
if ('development' === app.get('env')) { |
|
|
|
|
app.use(express.errorHandler()); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -39,6 +40,8 @@ app.get('/', round.index);
|
|
|
|
|
app.post('/round/others/', round.others); |
|
|
|
|
app.post('/round/played/', round.played); |
|
|
|
|
|
|
|
|
|
app.get('/db/', database.index); |
|
|
|
|
|
|
|
|
|
http.createServer(app).listen(app.get('port'), function(){ |
|
|
|
|
console.log('Express server listening on port ' + app.get('port')); |
|
|
|
|
}); |
|
|
|
|