separate static routes

This commit is contained in:
json 2021-09-02 10:27:28 +01:00
parent fca71bd5a7
commit 687857aec6
2 changed files with 13 additions and 0 deletions

View File

@ -1,7 +1,9 @@
const overridingRoutes = require('./overides'); const overridingRoutes = require('./overides');
const staticRoutes = require('./static');
const allRoutes = require('express').Router(); const allRoutes = require('express').Router();
allRoutes.use(overridingRoutes); allRoutes.use(overridingRoutes);
allRoutes.use(staticRoutes);
module.exports = allRoutes; module.exports = allRoutes;

11
routes/static.js Normal file
View File

@ -0,0 +1,11 @@
const staticRoutes = require('express').Router();
staticRoutes.get('/privacy', (req, res, next) => {
return res.render('privacypolicy', { user_preferences: req.cookies });
});
staticRoutes.get('/about', (req, res, next) => {
return res.render('about', { user_preferences: req.cookies });
});
module.exports = staticRoutes;