fix: broken everything

This commit is contained in:
2022-11-24 19:23:46 +01:00
parent 5adf51d1ab
commit 702e40ad05
+8 -4
View File
@@ -31,10 +31,6 @@ function mountIndexHtmlRoutes(r: Router, serveIndexHtml: Handler) {
console.log(`[Server] Mounted index html for "${route}"`) console.log(`[Server] Mounted index html for "${route}"`)
r.get(route, serveIndexHtml) r.get(route, serveIndexHtml)
} }
r.use('*', (_req, res) => {
res.redirect('/')
})
} }
async function createDevRouter() { async function createDevRouter() {
@@ -79,6 +75,10 @@ async function createDevRouter() {
} }
}) })
r.use('*', (_req, res) => {
res.redirect('/')
})
return r return r
} }
@@ -116,6 +116,10 @@ async function createProductionRouter() {
r.use('/', express.static('dist/entry-client')) r.use('/', express.static('dist/entry-client'))
r.use('*', (_req, res) => {
res.redirect('/')
})
return r return r
} }