forked from hd-auth/auth.sigidli.com
28 lines
659 B
JavaScript
28 lines
659 B
JavaScript
|
/**
|
||
|
* This router handles things related to the web browser experience...
|
||
|
*/
|
||
|
// This is the mock data we working with...
|
||
|
|
||
|
module.exports = function (options) {
|
||
|
|
||
|
var express = options.express;
|
||
|
|
||
|
const db = options.db;
|
||
|
|
||
|
var router = express.Router();
|
||
|
|
||
|
router.route('/')
|
||
|
.get(function(request, response, next) {
|
||
|
response.render("home", {
|
||
|
user: request.user,
|
||
|
pageTitle: "HDAuth - Home"
|
||
|
})
|
||
|
});
|
||
|
|
||
|
// TODO: load child routers automatically
|
||
|
var accountRouter = require('./account/index.js')(options);
|
||
|
|
||
|
router.use('/account', accountRouter);
|
||
|
|
||
|
return router;
|
||
|
};
|