From e367ffc37c6ea8c8f66177f54302fbc5c9736a34 Mon Sep 17 00:00:00 2001 From: ale Date: Mon, 30 Sep 2024 03:27:40 +0200 Subject: [PATCH] routes redirect --- server.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/server.js b/server.js index 16345fc..1e7f308 100644 --- a/server.js +++ b/server.js @@ -139,7 +139,9 @@ api(app, apex, client) apiswagger(app, client) swagger(app) app.use(express.static('dist')) - .use((err, req, res, next) => { + .use(Object.keys(routes).map(route => routes[route]), (req, res) => { + res.redirect('/') + }).use((err, req, res, next) => { if (res.headersSent) { console.error(err.stack) return next(err)