-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathfbb-data.js
More file actions
26 lines (20 loc) · 755 Bytes
/
fbb-data.js
File metadata and controls
26 lines (20 loc) · 755 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
var express = require("express"),
path = require('path'),
parser = require("body-parser"),
aws = require("aws-sdk"),
_ = require("underscore"),
players = require("./routes/players"),
projections = require("./routes/projections");
var app = express();
var port = process.env.PORT || 9080;
app.set('view engine', 'jade');
app.use(express.static(path.join(__dirname, 'public')));
// TODO load the player universe and cache it -- updates to the player universe will need a restart of the server
app.use('/players', players);
app.use('/projections', projections);
app.use('/', function(req, resp) {
resp.render('projections');
});
app.listen(port, function() {
console.log("server started listening on port: " + port);
});