Added angular config option

- (converted to unix line endings)
- added angular index.html config to run angular apps
pull/2/head
Trivernis 5 years ago
parent b17fca2590
commit d305261a0a

@ -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