Skip to content

Commit

Permalink
fix: add correct path to index.html; add status code when 500 error o…
Browse files Browse the repository at this point in the history
…ccurs
  • Loading branch information
kristian4res committed Oct 16, 2023
1 parent 1af9991 commit 7864414
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion server/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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", {});
});

Expand Down

0 comments on commit 7864414

Please sign in to comment.