forked from Shared/esg
Merge pull request 'main' (#11) from s.hajizadeh/esg:main into main
Reviewed-on: Shared/esg#11
This commit is contained in:
13
src/main.ts
13
src/main.ts
@@ -59,7 +59,9 @@ async function bootstrap(): Promise<void> {
|
|||||||
}),
|
}),
|
||||||
);
|
);
|
||||||
|
|
||||||
const swaggerConfig = new DocumentBuilder()
|
const baseUrlProd = process.env.BASE_URL_PROD;
|
||||||
|
|
||||||
|
const documentBuilder = new DocumentBuilder()
|
||||||
.setTitle('External Services Gateway')
|
.setTitle('External Services Gateway')
|
||||||
.setDescription(
|
.setDescription(
|
||||||
'Unified gateway for external inquiry providers with JWT authentication, RBAC, ' +
|
'Unified gateway for external inquiry providers with JWT authentication, RBAC, ' +
|
||||||
@@ -67,8 +69,13 @@ async function bootstrap(): Promise<void> {
|
|||||||
)
|
)
|
||||||
.setVersion('1.0')
|
.setVersion('1.0')
|
||||||
.addServer("http://localhost:8085")
|
.addServer("http://localhost:8085")
|
||||||
.addServer("https://apex.mic.co.ir/esg/api")
|
.addServer("https://apex.mic.co.ir/esg/api");
|
||||||
.addServer(process.env.BASE_URL_PROD)
|
|
||||||
|
if (baseUrlProd) {
|
||||||
|
documentBuilder.addServer(baseUrlProd);
|
||||||
|
}
|
||||||
|
|
||||||
|
const swaggerConfig = documentBuilder
|
||||||
.addBearerAuth(
|
.addBearerAuth(
|
||||||
{ type: 'http', scheme: 'bearer', bearerFormat: 'JWT', in: 'header' },
|
{ type: 'http', scheme: 'bearer', bearerFormat: 'JWT', in: 'header' },
|
||||||
'bearer',
|
'bearer',
|
||||||
|
|||||||
Reference in New Issue
Block a user