From bbab3cf95b85b0314e9f47328bb2a38c540a5345 Mon Sep 17 00:00:00 2001 From: Mark Powers Date: Sun, 26 Sep 2021 21:53:40 -0500 Subject: Add about me page --- src/server.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/server.js') diff --git a/src/server.js b/src/server.js index 4e109ad..b689ff5 100644 --- a/src/server.js +++ b/src/server.js @@ -100,6 +100,7 @@ async function sitemap(models) { "/work-square", "/misc", "/projects", + "/about", ] routes.forEach(item => { urlset.push(to_sitemap_xml(host, item, new Date().toISOString())) @@ -215,7 +216,6 @@ function setUpRoutes(models, jwtFunctions, database, templates) { server.get('/word-square', cache('5 minutes'), (req, res) => res.sendFile(__dirname + "/html/word-square.html")); server.get('/chess', cache('5 minutes'), (req, res) => res.sendFile(__dirname + "/html/chess.html")); server.get('/admin/chess', cache('5 minutes'), async (req, res, next) => res.sendFile(__dirname + "/html/chess.html")); - // server.get('/projects', (req, res) => res.sendFile(__dirname + "/html/projects.html")); server.get('/zines', cache('5 minutes'), (req, res) => res.sendFile(__dirname + "/public/zines.html")); server.use('/static', express.static(__dirname + '/public')) @@ -227,6 +227,10 @@ function setUpRoutes(models, jwtFunctions, database, templates) { let body = templates["projects"](); res.status(200).send(body) }) + server.get('/about', cache('5 minutes'), async (req, res) => { + let body = templates["about"](); + res.status(200).send(body) + }) server.get('/sitemap.xml', cache('1 day'), async (req, res) => { res.setHeader('Content-Type', 'text/xml') -- cgit v1.2.3