Merge branch 'julius-dev' of Software_Engineering_I/greenvironment-server into develop

pull/2/head
Trivernis 5 years ago committed by Gitea
commit b3e89b0c51

@ -87,8 +87,12 @@ class App {
}; };
})); }));
this.app.use((req: any, res: Response) => { this.app.use((req: any, res: Response) => {
if (globals.config.frontend.angularIndex) {
res.sendFile(path.join(__dirname, globals.config.frontend.angularIndex));
} else {
res.status(httpStatus.NOT_FOUND); res.status(httpStatus.NOT_FOUND);
res.render("errors/404.pug", {url: req.url}); res.render("errors/404.pug", {url: req.url});
}
}); });
this.app.use((err, req: Request, res: Response) => { this.app.use((err, req: Request, res: Response) => {
res.status(httpStatus.INTERNAL_SERVER_ERROR); res.status(httpStatus.INTERNAL_SERVER_ERROR);

@ -20,3 +20,6 @@ markdown:
# configuration for logging # configuration for logging
logging: logging:
level: info level: info
frontend:
angularIndex:

Loading…
Cancel
Save