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)