jingtian
This commit is contained in:
parent
8d503119a6
commit
16b170dfcf
2
app.js
2
app.js
@ -5,6 +5,8 @@ dbs = require("./bin/mongodb.js")('mongodb://localhost:27017',"xiangqin")
|
|||||||
// console.log(requter)
|
// console.log(requter)
|
||||||
// import requter from "./bin/router"
|
// import requter from "./bin/router"
|
||||||
const app = new Koa();
|
const app = new Koa();
|
||||||
|
const serve = require("koa-static")
|
||||||
|
app.use(serve(path.join(__dirname, '/images')));
|
||||||
app.use(koaJwt({ secret: 'gjhkhnjweuyujhgjh' }).unless({ path: [/^\/sign/,/^\/login/,/^\/images/,/^\/upload/] }));
|
app.use(koaJwt({ secret: 'gjhkhnjweuyujhgjh' }).unless({ path: [/^\/sign/,/^\/login/,/^\/images/,/^\/upload/] }));
|
||||||
|
|
||||||
// app.use(async (ctx, next) => {
|
// app.use(async (ctx, next) => {
|
||||||
|
@ -16,6 +16,7 @@
|
|||||||
"koa-bodyparser": "^4.2.1",
|
"koa-bodyparser": "^4.2.1",
|
||||||
"koa-jwt": "^4.0.3",
|
"koa-jwt": "^4.0.3",
|
||||||
"koa-router": "^7.4.0",
|
"koa-router": "^7.4.0",
|
||||||
|
"koa-static": "^5.0.0",
|
||||||
"mongodb": "^3.3.5"
|
"mongodb": "^3.3.5"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user