Try to fix Payload Too Large

This commit is contained in:
sorawit 2024-04-20 11:20:34 +07:00
parent e43fabb216
commit 96d732bb96
3 changed files with 117 additions and 67 deletions

4
app.ts
View file

@ -14,9 +14,9 @@ import { convertTemplateRoute } from './libs/convert-libs'
const app: Express = express()
const port: number = Number(process.env.PORT) || 80;
app.use(cors());
app.use(express.json()); //application/json
app.use(express.json({ limit: "200mb" })); //application/json
app.use(express.raw()); //application/octet-stream
app.use(express.urlencoded({ extended: true }));
app.use(express.urlencoded({ extended: true, limit: "200mb" }));
app.use("/swagger", swaggerUi.serve, swaggerUi.setup(swaggerspecs,{ explorer: true }));
app.get('/', (req: Request, res: Response) => {
res.json({