mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2025-05-19 09:45:37 -04:00
Handle config initialisation error on app bootstrap
Signed-off-by: David Mehren <git@herrmehren.de>
This commit is contained in:
parent
8357f3072c
commit
4959be739a
1 changed files with 5 additions and 0 deletions
|
@ -26,6 +26,11 @@ async function bootstrap(): Promise<void> {
|
||||||
const appConfig = configService.get<AppConfig>('appConfig');
|
const appConfig = configService.get<AppConfig>('appConfig');
|
||||||
const mediaConfig = configService.get<MediaConfig>('mediaConfig');
|
const mediaConfig = configService.get<MediaConfig>('mediaConfig');
|
||||||
|
|
||||||
|
if (!appConfig || !mediaConfig) {
|
||||||
|
logger.error('Could not initialize config, aborting.', 'AppBootstrap');
|
||||||
|
process.exit(1);
|
||||||
|
}
|
||||||
|
|
||||||
setupPublicApiDocs(app);
|
setupPublicApiDocs(app);
|
||||||
logger.log(
|
logger.log(
|
||||||
`Serving OpenAPI docs for public api under '/apidoc'`,
|
`Serving OpenAPI docs for public api under '/apidoc'`,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue