From c6f92c0f770450779103efbe689eaecf922b3d08 Mon Sep 17 00:00:00 2001 From: Methapon2001 <61303214+Methapon2001@users.noreply.github.com> Date: Thu, 30 Nov 2023 10:06:54 +0700 Subject: [PATCH] fix: cannot reach api endpoint --- Services/server/src/app.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Services/server/src/app.ts b/Services/server/src/app.ts index 33ad44b..1494ea5 100644 --- a/Services/server/src/app.ts +++ b/Services/server/src/app.ts @@ -27,8 +27,7 @@ RegisterRoutes(router); app.use(swaggerSpecs.basePath, router); app.use(errorHandler); -app.use(express.static("static")); -app.get("*", (_req, res) => { +app.use((_req, res, _next) => { res.sendFile(`${process.cwd()}/static/index.html`); });