diff --git a/server/index.ts b/server/index.ts index c5f354e..ca58c6d 100644 --- a/server/index.ts +++ b/server/index.ts @@ -44,6 +44,10 @@ await app.register(fastifyMiddie); await app.use(astroHandler); +app.setNotFoundHandler((req, res) => { + res.redirect('/404'); // This is hacky as hell +}); + const port = parseInt(process.env.PORT as string) || parseInt("8080"); app.listen({ port: port, host: "0.0.0.0" }).then(async () => {