Skip to content

Commit

Permalink
setting :: 스웨거 세팅
Browse files Browse the repository at this point in the history
setting :: 스웨거 세팅
  • Loading branch information
geunoo authored Dec 28, 2023
2 parents 0165a41 + e7b64ea commit f650f51
Show file tree
Hide file tree
Showing 3 changed files with 70 additions and 2 deletions.
56 changes: 56 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,13 @@
"dependencies": {
"@aws-sdk/client-s3": "^3.438.0",
"@nestjs/cache-manager": "^2.1.0",
"@nestjs/cli": "^10.0.0",
"@nestjs/common": "^10.0.0",
"@nestjs/config": "^3.1.1",
"@nestjs/core": "^10.2.7",
"@nestjs/jwt": "^10.1.1",
"@nestjs/platform-express": "^10.0.0",
"@nestjs/swagger": "^7.1.17",
"@nestjs/typeorm": "^10.0.0",
"cache-manager": "^5.2.3",
"cache-manager-redis-yet": "^4.1.2",
Expand All @@ -38,8 +40,7 @@
"reflect-metadata": "^0.1.13",
"rxjs": "^7.8.1",
"typeorm": "^0.3.17",
"typeorm-naming-strategies": "^4.1.0",
"@nestjs/cli": "^10.0.0"
"typeorm-naming-strategies": "^4.1.0"
},
"devDependencies": {
"@nestjs/schematics": "^10.0.0",
Expand Down
11 changes: 11 additions & 0 deletions src/main.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,19 @@
import { NestFactory } from '@nestjs/core';
import { AppModule } from './app.module';
import { DocumentBuilder, SwaggerModule } from '@nestjs/swagger';

async function bootstrap() {
const app = await NestFactory.create(AppModule);

const config = new DocumentBuilder()
.setTitle('afterschool API Docs')
.setDescription('방과후 신청 프로그램 api docs입니다.')
.setVersion('1.0')
.addTag('after')
.build();
const document = SwaggerModule.createDocument(app, config);
SwaggerModule.setup('api', app, document);

await app.listen(3000);
}
bootstrap();

0 comments on commit f650f51

Please sign in to comment.