Try to fix Payload Too Large
This commit is contained in:
parent
e43fabb216
commit
96d732bb96
3 changed files with 117 additions and 67 deletions
4
app.ts
4
app.ts
|
|
@ -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({
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue