From 687857aec63a074853da796c1436931ed59edc45 Mon Sep 17 00:00:00 2001 From: json Date: Thu, 2 Sep 2021 10:27:28 +0100 Subject: [PATCH] separate static routes --- routes/index.js | 2 ++ routes/static.js | 11 +++++++++++ 2 files changed, 13 insertions(+) create mode 100644 routes/static.js diff --git a/routes/index.js b/routes/index.js index c07697b..a28d127 100644 --- a/routes/index.js +++ b/routes/index.js @@ -1,7 +1,9 @@ const overridingRoutes = require('./overides'); +const staticRoutes = require('./static'); const allRoutes = require('express').Router(); allRoutes.use(overridingRoutes); +allRoutes.use(staticRoutes); module.exports = allRoutes; diff --git a/routes/static.js b/routes/static.js new file mode 100644 index 0000000..62485fb --- /dev/null +++ b/routes/static.js @@ -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;