Logging: Add OpenAPI log messages

Let the user know where the OpenAPI docs can be found.

Signed-off-by: Philip Molares <philip.molares@udo.edu>
This commit is contained in:
Philip Molares 2021-04-02 17:40:44 +02:00
parent 3493a7a26f
commit 31b0d797f3

View file

@ -25,8 +25,16 @@ async function bootstrap(): Promise<void> {
const mediaConfig = configService.get<MediaConfig>('mediaConfig');
setupPublicApiDocs(app);
logger.log(
`Serving OpenAPI docs for public api under '/apidoc'`,
'AppBootstrap',
);
if (process.env.NODE_ENV === 'development') {
setupPrivateApiDocs(app);
logger.log(
`Serving OpenAPI docs for private api under '/private/apidoc'`,
'AppBootstrap',
);
}
app.useGlobalPipes(