routes redirect
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
ale 2024-09-30 03:27:40 +02:00
parent 43026021f5
commit e367ffc37c

View File

@ -139,7 +139,9 @@ api(app, apex, client)
apiswagger(app, client) apiswagger(app, client)
swagger(app) swagger(app)
app.use(express.static('dist')) 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) { if (res.headersSent) {
console.error(err.stack) console.error(err.stack)
return next(err) return next(err)