From b9ca713a2a6d5c9e1b2a1bbefce7ff44f0e8f0c5 Mon Sep 17 00:00:00 2001 From: Evandro Fonseca Junior Date: Fri, 21 Nov 2025 23:51:52 -0300 Subject: [PATCH] Add explicit route for SPA at root path to serve index.html --- server/src/index.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/server/src/index.ts b/server/src/index.ts index 6d78c32..66fe518 100644 --- a/server/src/index.ts +++ b/server/src/index.ts @@ -27,6 +27,11 @@ await app.register(fastifyStatic, { index: ["index.html"], }); +// Rota explĂ­cita para a SPA na raiz, Ăștil especialmente em ambientes de deploy. +app.get("/", (_request, reply) => { + return reply.sendFile("index.html"); +}); + app.get("/health", async () => { return { status: "ok" }; });