Skip to content

Commit

Permalink
fix: request entity too large
Browse files Browse the repository at this point in the history
  • Loading branch information
suk-6 committed Sep 24, 2024
1 parent d56c4ad commit c750397
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 0 deletions.
2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@
"@openzeppelin/contracts": "^5.0.2",
"@prisma/client": "5.19.1",
"bcrypt": "^5.1.1",
"body-parser": "^1.20.3",
"cache-manager-redis-yet": "^5.1.4",
"class-transformer": "^0.5.1",
"class-validator": "^0.14.1",
Expand All @@ -63,6 +64,7 @@
"@nestjs/testing": "^10.0.0",
"@trivago/prettier-plugin-sort-imports": "^4.3.0",
"@types/bcrypt": "^5.0.2",
"@types/body-parser": "^1.19.5",
"@types/express": "^4.17.17",
"@types/jest": "^29.5.2",
"@types/luxon": "^3.4.2",
Expand Down
27 changes: 27 additions & 0 deletions pnpm-lock.yaml

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

5 changes: 5 additions & 0 deletions src/main.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import { json, urlencoded } from 'body-parser';

import { ValidationPipe } from '@nestjs/common';
import { NestFactory } from '@nestjs/core';
import { DocumentBuilder, SwaggerModule } from '@nestjs/swagger';
Expand All @@ -9,6 +11,9 @@ async function bootstrap() {
logger: ['error', 'warn', 'log'],
});

app.use(json({ limit: '50mb' }));
app.use(urlencoded({ extended: true, limit: '50mb' }));

const config = new DocumentBuilder()
.setTitle('Shocki API')
.setDescription('Shocki API Server')
Expand Down

0 comments on commit c750397

Please sign in to comment.