Merge branch 'master' into release
This commit is contained in:
commit
d5147987f7
6
app.js
6
app.js
@ -2,10 +2,16 @@ const config = require('./config')
|
||||
const Koa = require('koa')
|
||||
const koaLogger = require('koa-logger')
|
||||
const koaSession = require('koa-session2')
|
||||
const cors = require('kcors')
|
||||
const router = require('./route')
|
||||
const app = new Koa()
|
||||
|
||||
app.use(koaLogger())
|
||||
app.use(cors({
|
||||
origin: (c) => {
|
||||
return c.get('Origin')
|
||||
}
|
||||
}))
|
||||
app.use(koaSession())
|
||||
app.use(router.allowedMethods())
|
||||
app.use(router.routes())
|
||||
|
@ -20,6 +20,7 @@
|
||||
"dotenv": "^6.0.0",
|
||||
"gm": "^1.23.1",
|
||||
"ioredis": "^3.2.2",
|
||||
"kcors": "^2.2.2",
|
||||
"koa": "^2.5.1",
|
||||
"koa-body": "^4.0.3",
|
||||
"koa-logger": "^3.2.0",
|
||||
|
Loading…
Reference in New Issue
Block a user