node服务body最大值调整为50mb
This commit is contained in:
		
							
								
								
									
										2
									
								
								index.js
									
									
									
									
									
								
							
							
						
						
									
										2
									
								
								index.js
									
									
									
									
									
								
							@@ -12,7 +12,7 @@ chalk.level = 1
 | 
				
			|||||||
app.listen(port, () => {
 | 
					app.listen(port, () => {
 | 
				
			||||||
  db.init()
 | 
					  db.init()
 | 
				
			||||||
  app.use(express.json()) // for parsing application/json
 | 
					  app.use(express.json()) // for parsing application/json
 | 
				
			||||||
  app.use(express.urlencoded({extended: true})) // for parsing application/x-www-form-urlencoded
 | 
					  app.use(express.urlencoded({extended: true, limit: '50mb'})) // for parsing application/x-www-form-urlencoded
 | 
				
			||||||
  Promise.all([rest.init(app), ws.init(app)]).then(() => {
 | 
					  Promise.all([rest.init(app), ws.init(app)]).then(() => {
 | 
				
			||||||
    log(`${chalk.bgGreen.black(" DONE ")} serve is listening on ${port}`)
 | 
					    log(`${chalk.bgGreen.black(" DONE ")} serve is listening on ${port}`)
 | 
				
			||||||
  })
 | 
					  })
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user