1
0
Fork 0
mirror of https://github.com/codex-team/codex.docs.git synced 2025-07-31 19:19:41 +02:00
codex.docs/src/routes/home.js

15 lines
409 B
JavaScript
Raw Normal View History

const express = require('express');
const verifyToken = require('./middlewares/token');
const router = express.Router();
/* GET home page. */
router.get('/', verifyToken, async (req, res) => {
const config = req.app.locals.config;
if (config.startPage) {
return res.redirect(config.startPage);
}
res.render('pages/index', { isAuthorized: res.locals.isAuthorized });
});
module.exports = router;