Skip to content

Commit

Permalink
feat: json payload size 10 mb url encode 20mb
Browse files Browse the repository at this point in the history
  • Loading branch information
Pratap2018 committed May 9, 2024
1 parent b228077 commit 92c11b6
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/main.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { NestFactory } from '@nestjs/core';
import { AppModule } from './app.module';
import { urlencoded } from 'express';
import { urlencoded,json } from 'express';
import { LogLevel, Logger, ValidationPipe } from '@nestjs/common';
import { DocumentBuilder, SwaggerModule } from '@nestjs/swagger';
async function bootstrap() {
Expand All @@ -24,6 +24,7 @@ async function bootstrap() {
.setVersion('v0.1')
.build();
app.setGlobalPrefix('api/v1');
app.use(json({ limit: '10mb' }));
app.use(urlencoded({ extended: true, limit: '10mb' }));
app.enableCors();
const document = SwaggerModule.createDocument(app, config);
Expand Down

0 comments on commit 92c11b6

Please sign in to comment.