how can I access manhour without writing path parameters? in addition, I would like to ask, do not directly operate the database, only interface forwarding, koa2 can have the concept of model ? now I am using the chained router.get ( manhou...
ask for help. The company s project is divided into libraries according to business. After establishing a connection using sequelize, the connection cache is saved in memory. When there are many sub-libraries, the memory occupation is too high, is there...
Front-end axios this.$axios({ method: post , url: api login , data : { json name : this.name, password: this.password } koa const Koa =...
using koa2 s middleware, I want to implement an interceptor in order to perform some processing on all requests. The code is as follows: when visiting , the middleware is executed and and 1111 are printed at the terminal, but the page shows tha...
< H2 > question < H2 > when find () is used in findAddUsers.js , the data can be read normally, but there is no data in return < H2 > Code < H2 > findAddUsers.js const mongoose = require( mongoose ) let Schema = mongoose.Schema let UserSchem...
is there any difference below? controllers async function get (ctx, next) { const res = await models.test.get() ctx.state.data = res.data ******* ******** ctx.body = res.data await next() } module.exports = { ge...
the business you want to achieve is to render the page first, and then add content to the page through ctx.body the core code is as follows await ctx.render( crawler , { title: , content: `<h2>< h2> <h4>...
is it necessary for RT: to do this? if you don t think this is necessary, how can koa-router standardize the interface path and html path? ...
how to deal with it generally, all I can think of is to do some interfaces on the node server, as shown in the following figure: routes news.js const router = require( koa-router )({ prefix: news }) const config = require( .. config ) ...
I fumbled to do web development with koa2, and now I find that the front desk is unable to request data. I would like to ask what is unreasonable? controllers page.js models pageModel.js public routes index.js views page.ejs app.j...
how to share session? express using express-session module eggjs using koa-session module for two projects under the same domain name using express and eggjs framework respectively. Their cookie encryption seems to be different. ...
the middle tier I started with node (koa) has a lot of timeouts from the very beginning. I wrote the timeout control myself. At first, I wrote the timeout, then the request grew, the timeout also increased, and finally I reached several hours, and then I...
router.get( meibrain , async (ctx, next) => { await ctx.render( meibrain , { imgSrc: images newsbannenr.png , koa-router }) })...
in the process of developing koa, every time you modify a file, you need to re-execute node app.js. Is there any way not to re-execute the command, automatically listen for changes, and restart the service, just like webpack? ...
I would like to ask you bosses about the problems in the direction of learning how to learn Node has always been my doubt. The blogs and tutorials I read on the Internet are all about learning several core modules of Nodejs (fs,path,event,buffer,http)...
ctx.set( Content-disposition , attachment; filename=district.csv ); ctx.set( content-type , text csv; charset=utf-8 ); ctx.statusCode = 200; ctx.body = csv; set excel to open or garbled in this way ...
where an exception is thrown formatOutput ...
recently in learning the koa framework to build a node environment, writing a small case requires the following: the node program reads a path, and if it is a folder, put the folder name into the list collection. Promise is used in the program to do asy...
use node-archiver module to package and compress in koa is there a boss who knows how to solve the problem? ...
as shown in the figure, on the server side, the results of the local query are all correct, but why the request is not correct in the node environment ...
would you please quote jquery.js, to run the code? it s OK on Xiaomi phone. There are obvious stutters on Huawei Meizu and vivo, iphoneSE can, and iphone6s have obvious stutters. There must be this kind of problem in some untested models. I don t know...
how do you realize that a registration page needs to switch between individual registration and institutional registration? ...
problem description how the el-tree component updates the data of the pointing node and the child node, the environmental background of the problems and what methods you have tried The phenomenon is shown in the picture above 1, the left tree...
vue project can run well locally, and js cannot be loaded after deployment to the server bosses, excuse me, after deployment to the server, the home page can be loaded, but cannot make a request. What is the reason for opening the browser information ...
this rookie newly built project, wanted to try the vue component, chose vantUI as the component development. Refer to the official API documentation for component introduction configuration, but I don t know which step was ignored and an error was repo...