fix: broken everything
This commit is contained in:
@@ -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
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user