Merge branch 'master' into release

This commit is contained in:
Jay 2018-08-17 22:52:56 +08:00
commit d5147987f7
2 changed files with 7 additions and 0 deletions

6
app.js
View File

@ -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())

View File

@ -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",