Front desk:
:
ctxundefined
ctx.body, is set, but the front end is still 404
what"s going on
Front desk:
:
ctxundefined
ctx.body, is set, but the front end is still 404
what"s going on
that depends on why your ctx
is a Promise
.
several interfaces are written with koa+mongodb. Cross-domain errors are always reported when requesting with ajax, even if cors is used in koa. Google has done a lot of things but still hasn t solved the problem . const cors = require( koa2-cors ); ...
1. First of all, get the order list through the query, and then add the user name and user password for each order object through the for loop. When I console.log, the console has output, but when I, ctx.body = {data:orderList}, the result obtained asyn...
const MongoClient = require( mongodb ).MongoClient; const url = mongodb: localhost:27017 ; Database Name const dbName = youyue ; var obj = {}; module.exports = async(ctx,next)=>{ const num = ctx.query.num, page = ctx.query.pag...
problem description how does koa+mysql, implement batch update and batch insert, realized batch deletions sql id let cartDelectById = (id) => { let sql = `delete from cart where cart_id = ${id};` return query(sql) } ...
recently encountered a small problem, I want to use koa to do a simple static file server. After app.listen (5050) listens on a port, I want to confirm the occupancy status of this, because the app.listen () statement may be called many times while the ...
nodemailer "nodemailer ": "^4.6.8 ",501QQ501 let transporter = nodeMailer.createTransport ({ host:Email.smtp.host, port:465, secure:true, auth:{ user:Email.smtp.user, pass:Email.smtp.pass, } }) let ko = { c...