From a6ca0209ada2c5a01c0bf3255e0faf0e2a94502a Mon Sep 17 00:00:00 2001 From: Matt Huntington Date: Sun, 14 Aug 2016 14:29:20 -0400 Subject: [PATCH] setting up runs controller --- controllers/runs.js | 7 +++++++ server.js | 3 +++ 2 files changed, 10 insertions(+) create mode 100644 controllers/runs.js diff --git a/controllers/runs.js b/controllers/runs.js new file mode 100644 index 0000000..596523c --- /dev/null +++ b/controllers/runs.js @@ -0,0 +1,7 @@ +var controller = require('express').Router(); + +controller.get('/', function(req, res){ + res.send('oh hai!'); +}) + +module.exports = controller; diff --git a/server.js b/server.js index ee3501f..0f79b39 100644 --- a/server.js +++ b/server.js @@ -4,6 +4,9 @@ var PORT = process.env.PORT || 3000; app.use(express.static('public')); +var runsController = require('./controllers/runs.js'); +app.use('/runs/', runsController); + app.listen(PORT, function(){ console.log('listening on port ' + PORT); });