Unverified Commit 09df8c40 authored by Mark Stenglein's avatar Mark Stenglein
Browse files

Move docs to own routing file

parent 79ba1fbc
......@@ -11,6 +11,7 @@ var config = require('./config');
// Load in Routes
var routes = require('./routes/index');
var docs = require('./routes/docs');
var apiV1 = require('./routes/api/v1');
var app = express();
......@@ -40,6 +41,7 @@ var populateDB = require('./setup/populateDB');
populateDB();
app.use('/', routes);
app.use('/docs', docs);
app.use('/api/v1', apiV1);
// catch 404 and forward to error handler
......
var express = require('express');
var router = express.Router();
var mongoose = require('mongoose');
var Semester = require('../models/Semester');
// Load site wide configurations
var config = require('../config');
router.get('/', function(req, res, next) {
res.render('docs', { config });
})
module.exports = router;
......@@ -6,10 +6,6 @@ var Semester = require('../models/Semester');
// Load site wide configurations
var config = require('../config');
router.get('/docs', function(req, res, next) {
res.render('docs', { config });
})
// TODO: Actually learn how to make this function set be passed around properly
/* GET home page. */
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment