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?
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?
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 ...
use node-archiver module to package and compress in koa is there a boss who knows how to solve the problem? ...
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...
where an exception is thrown formatOutput ...
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 ...
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)...
router.get( meibrain , async (ctx, next) => { await ctx.render( meibrain , { imgSrc: images newsbannenr.png , koa-router }) })...
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...
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. ...
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 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 ) ...
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? ...
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 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...
< 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...
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...
Front-end axios this.$axios({ method: post , url: api login , data : { json name : this.name, password: this.password } koa const Koa =...
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...
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...
the server uses koa , uses pug template engine, and renders the template in the way of ctx.render ( layout , data) ). How to refresh the front-end page automatically after changing the front-end pug , less , js files? ...