1- import " dotenv/config" ;
2- import { NestFactory } from " @nestjs/core" ;
3- import { AppModule } from " ./app.module" ;
4- import { SwaggerModule , DocumentBuilder } from " @nestjs/swagger" ;
5- import { INestApplication , ValidationPipe } from " @nestjs/common" ;
6- import { generateOpenApiSpecs } from " ./utils/openapi" ;
7- import chalk from " chalk" ;
8- import { NestExpressApplication } from " @nestjs/platform-express" ;
9- import { AppConfig } from " ./common/config/app.config" ;
10- import { apiReference } from " @scalar/nestjs-api-reference" ;
1+ import ' dotenv/config' ;
2+ import { NestFactory } from ' @nestjs/core' ;
3+ import { AppModule } from ' ./app.module' ;
4+ import { SwaggerModule , DocumentBuilder } from ' @nestjs/swagger' ;
5+ import { INestApplication , ValidationPipe } from ' @nestjs/common' ;
6+ import { generateOpenApiSpecs } from ' ./utils/openapi' ;
7+ import chalk from ' chalk' ;
8+ import { NestExpressApplication } from ' @nestjs/platform-express' ;
9+ import { AppConfig } from ' ./common/config/app.config' ;
10+ import { apiReference } from ' @scalar/nestjs-api-reference' ;
1111
1212async function bootstrap ( ) {
1313 const app = await NestFactory . create < NestExpressApplication > ( AppModule ) ;
@@ -20,8 +20,8 @@ async function bootstrap() {
2020 app . useGlobalPipes (
2121 new ValidationPipe ( {
2222 whitelist : true ,
23- transform : true
24- } )
23+ transform : true ,
24+ } ) ,
2525 ) ;
2626
2727 /* -------------------------------------------------------------------------- */
@@ -40,28 +40,28 @@ async function bootstrap() {
4040 } ) ;
4141}
4242
43- bootstrap ( ) ;
43+ void bootstrap ( ) ;
4444
4545function setupSwagger ( app : INestApplication ) {
4646 const { name } = app . get ( AppConfig ) ;
4747
4848 const config = new DocumentBuilder ( )
4949 . setTitle ( `${ name } API` )
5050 . setDescription ( `The ${ name } API` )
51- . setVersion ( " 1.0" )
51+ . setVersion ( ' 1.0' )
5252 . addTag ( name )
5353 . build ( ) ;
5454
5555 const document = SwaggerModule . createDocument ( app , config ) ;
5656
5757 app . use (
58- " /openapi" ,
58+ ' /openapi' ,
5959 apiReference ( {
6060 sources : [
6161 { content : document , title : `${ name } API` } ,
62- { url : " /auth/client/open-api/generate-schema" , title : " BetterAuth" }
63- ]
64- } )
62+ { url : ' /auth/client/open-api/generate-schema' , title : ' BetterAuth' } ,
63+ ] ,
64+ } ) ,
6565 ) ;
6666
6767 return document ;
0 commit comments