This commit is contained in:
dylan
2024-03-31 19:40:06 -07:00
parent f17578af17
commit fb145c7531
6 changed files with 120 additions and 8 deletions

View File

@@ -24,7 +24,13 @@ server.register(fastifyStatic, {
routeList.forEach(firRoute => {
server.route(route(firRoute));
})
});
server.setNotFoundHandler((req, res) => {
if (!req.url.startsWith("/api")) {
res.sendFile('index.html');
}
});
// Run the server!
try {