Come on fastify really? I had to ADD THAT??
This commit is contained in:
parent
b64757748e
commit
6ecff4756d
1 changed files with 4 additions and 0 deletions
|
|
@ -44,6 +44,10 @@ await app.register(fastifyMiddie);
|
||||||
|
|
||||||
await app.use(astroHandler);
|
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");
|
const port = parseInt(process.env.PORT as string) || parseInt("8080");
|
||||||
|
|
||||||
app.listen({ port: port, host: "0.0.0.0" }).then(async () => {
|
app.listen({ port: port, host: "0.0.0.0" }).then(async () => {
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue