Merge remote-tracking branch 'origin/julius-dev' into julius-dev

pull/2/head
Trivernis 5 years ago
commit 157249c2f6

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