This commit is contained in:
parent
43026021f5
commit
e367ffc37c
@ -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)
|
||||||
|
Loading…
Reference in New Issue
Block a user