企微考试提交
This commit is contained in:
		
							
								
								
									
										3
									
								
								index.js
									
									
									
									
									
								
							
							
						
						
									
										3
									
								
								index.js
									
									
									
									
									
								
							@@ -1,4 +1,5 @@
 | 
			
		||||
const express = require('express')
 | 
			
		||||
const xmlparser = require('express-xml-bodyparser');
 | 
			
		||||
require("express-async-errors")
 | 
			
		||||
const db = require('./src/utils/dbUitls')
 | 
			
		||||
const rest = require('./src/rest')
 | 
			
		||||
@@ -13,7 +14,9 @@ chalk.level = 1
 | 
			
		||||
app.listen(port, () => {
 | 
			
		||||
  db.init()
 | 
			
		||||
  app.use(express.json()) // for parsing application/json
 | 
			
		||||
  app.use(xmlparser());
 | 
			
		||||
  app.use(express.urlencoded({extended: true, limit: '50mb'})) // for parsing application/x-www-form-urlencoded
 | 
			
		||||
 | 
			
		||||
  Promise.all([rest.init(app)]).then(() => {
 | 
			
		||||
    log(`${chalk.bgGreen.black(" DONE ")} serve is listening on ${port}`)
 | 
			
		||||
    ws.init(app)
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user