problem description pixijs the environmental background of the problems and what methods you have tried loader.add`crossOrigin: true`cors related codes ...
_ _ dirname is the current directory, not the project root. the initial question is that I want to put all the uploaded files in the upload directory under the root directory of the project, but how do I get this root directory? consider storing _ _...
I just learned from react to write a spa single-page application. I know a little about "nodejs+koa2+ template " to build a simple website, but it is confusing to combine react+koa2: 1, can a single spa page be used simultaneously with backend template...
const session = require( koa-session ) const redis = require( koa-redis ) how do you write your configuration? Can you post the code? ...
use an article details interface written in the koa framework, router is: post :id. When the address bar enters localhost:3000 post 5c3edc8815ec073b1c221563, the article details API is called twice in a row. The id obtained by for the first time is ...
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...
recently, when using the template engine under eggjs, you need to use the ctx.renderView method to return the content in the template, but it is found that the returned content will have blank lines and spaces, because there is a site after the template...
koa2 uses koa2-connect-history-api-fallback when configuring vue single-page history mode. Writing according to the document has no effect. Please give me some advice from passers-by. Thank you! part of the code is as follows: const Koa = require( ko...
I used koa2 to do an interface proxy layer, and now I have a problem that the forwarding file upload is not successful. my expectation is that the web page calls form to request uploading files to the koa layer, and the Koa layer is using the axios req...
1.publicconfig.default.js question: why http: localhost:9999 cannot directly access the front-end interface, and why I cannot find the http: localhost:9999 device_monitor path at the address. ...
for example: I use Github s OAuth, when the browser requests, I wanted to send an asynchronous request for authentication to github, but the browser didn t wait for me to get the information from github and response it to the browser. browser rep...
problem description you can use await, but why not use traditional callbacks? related codes router.get( getArticles , async (ctx) => { let { sizes, pageNum } = ctx.query sizes = Number(sizes) pageNum = Number(pageNum) co...
I didn t load the koa-static-cache middleware, so the rendered image won t come out. May I ask why there is a static resource server? if not, there is a problem with the picture path there is also the following picture. Why does this file cache have...
problem description after the post request is sent by the current end, the database successfully writes the data, but the backend still reports an error of Error: connect ECONNREFUSED 127.0.0.1, and returns 500. the environmental background of the p...
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 ...
I am doing token verification. Only after successful verification can I continue to pull data. But now I can pull data in the controller after successful verification, but I cannot return the error 404 to the client. here is the code: 1.jwt Code: co...
I am doing token verification. Only after successful verification can I continue to pull data. But now I can pull data in the controller after successful verification, but I cannot return the error 404 to the client. here is the code: 1.jwt Code: co...
I upload the avatar on the client side, and the picture is uploaded to the server and saved in a fixed folder. Now how do I read this picture on the client side? the running environment is the backend is node koa related codes exports.editcover = a...
now the company is working on the front-end separation project, but the front-end project cannot be reconstructed directly. The original project is deeply embedded in the Java service and can only be separated step by step. 2. Now with nginx configu...
class Models { async setModels(app){ const sequelize = require( sequelize ) const files = await this.readModels() global.Models = {} global.Models._Op = sequelize.Op app.context.Models = {} app.co...