This commit is contained in:
luyuan 2020-12-25 15:15:08 +08:00
parent 19ecee362a
commit 5dc5043525
Signed by: theluyuan
GPG Key ID: A7972FD973317FF3
4 changed files with 837 additions and 841 deletions

2
app.js
View File

@ -75,7 +75,7 @@ app.use(async (ctx,next)=>{
const bodyParser = require('koa-bodyparser'); const bodyParser = require('koa-bodyparser');
app.use(bodyParser()); app.use(bodyParser());
// console.log(requter()) // console.log(requter().stack)
app.use(requter()); app.use(requter());
app.listen(3004); app.listen(3004);
console.log("http://localhost:3004") console.log("http://localhost:3004")

View File

@ -6,11 +6,11 @@ function addMapping(router, mapping) {
if (url.startsWith('GET ')) { if (url.startsWith('GET ')) {
var path = url.substring(4); var path = url.substring(4);
router.get(path, mapping[url]); router.get(path, mapping[url]);
// console.log(`register URL mapping: GET ${path}`); console.log(`register URL mapping: GET ${path}`);
} else if (url.startsWith('POST ')) { } else if (url.startsWith('POST ')) {
var path = url.substring(5); var path = url.substring(5);
router.post(path, mapping[url]); router.post(path, mapping[url]);
// console.log(`register URL mapping: POST ${path}`); console.log(`register URL mapping: POST ${path}`);
} else { } else {
console.log(`invalid URL: ${url}`); console.log(`invalid URL: ${url}`);
} }

View File

@ -22,6 +22,7 @@ let findlist = async (ctx, next) => {
// } // }
// } // }
console.log("/find111")
let pro = [] let pro = []
let list = [] let list = []
for (let i in reptilelist) { for (let i in reptilelist) {
@ -54,7 +55,7 @@ let findlist = async (ctx, next) => {
} }
}) })
console.log(1111)
ctx.body = JSON.stringify(list) ctx.body = JSON.stringify(list)
} }
let section = async (ctx, next) => { let section = async (ctx, next) => {

1669
yarn.lock

File diff suppressed because it is too large Load Diff