From 7864414d964e722a5a4b085516bb1ea38249f03b Mon Sep 17 00:00:00 2001 From: kristian4res <57638182+Enigma-cloud@users.noreply.github.com> Date: Mon, 16 Oct 2023 14:49:28 +0100 Subject: [PATCH] fix: add correct path to index.html; add status code when 500 error occurs --- server/server.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/server/server.ts b/server/server.ts index 3741640..935dea4 100644 --- a/server/server.ts +++ b/server/server.ts @@ -41,13 +41,14 @@ export default function nodeServer(environmentVariables: EnvironmentVariables, b server.get("*", function (req: Request, res: Response) { const clientUrl = environmentVariables.VM_EXTERNAL_CLIENT_URL; const dashboardUrl = environmentVariables.CATI_DASHBOARD_URL; - res.render("index.html", { + res.render("../public/index.html", { clientUrl, dashboardUrl }); }); server.use(function (err: Error, req: Request, res: Response) { req.log.error(err.stack); + res.status(500); res.render("../views/500.html", {}); });