|
|
|
@ -8,10 +8,6 @@ router.use(function (req,res,next) { |
|
|
|
console.log("%s %s => %i", req.method, req.originalUrl, res.statusCode); |
|
|
|
}); |
|
|
|
|
|
|
|
router.get("/",function(req,res){ |
|
|
|
res.sendFile(__dirname + '/views/index.html'); |
|
|
|
}); |
|
|
|
|
|
|
|
router.get("/location", function(req, res) { |
|
|
|
var response = { "Location": "SFO" }; |
|
|
|
res.type('application/json') |
|
|
|
@ -19,6 +15,21 @@ router.get("/location",function(req,res){ |
|
|
|
.end(); |
|
|
|
}); |
|
|
|
|
|
|
|
router.get("/timeframe",function(req, res) { |
|
|
|
var response = { "From": "08/05/2018", "To": "10/05/2018" }; |
|
|
|
res.type('application/json') |
|
|
|
.send(JSON.stringify(response)) |
|
|
|
.end(); |
|
|
|
}); |
|
|
|
|
|
|
|
/* |
|
|
|
router.get("/participants",function(req, res) { |
|
|
|
var response = [ "Mark", "Nicolas" ]; |
|
|
|
res.type('application/json') |
|
|
|
.send(JSON.stringify(response)) |
|
|
|
.end(); |
|
|
|
}); |
|
|
|
*/ |
|
|
|
|
|
|
|
app.use("/",router); |
|
|
|
|
|
|
|
|