use node-archiver module to package and compress in koa
is there a boss who knows how to solve the problem?
use node-archiver module to package and compress in koa
is there a boss who knows how to solve the problem?
change it yourself. Most compressed and decompressed packages on npm use utf-8
encoding and do not provide encoding configuration, so you can only change the source code.
it turns out that it is a problem with my own compressed package software. Finally, I can upgrade the computer's WinRAR software.
Previous: How to use queues in JS or react?
-
How to set the koa download file to "utf-8"
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
...
-
The development of koa2 web is confused and asks for advice.
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...
-
Koa2 server rendering web development, how to deal with the data interaction triggered by browser events?
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 )
...
-
Can you give an example of express koa middleware?
when learning express and koa middleware, I have always understood it according to the onion model. But in theory, they are different.
express
var express = require( express );
var app = express();
app.use((req, res, next) => {
setTimeout((...
Mar.12,2021
-
How does eggjs implement any field model?
I recently played with the strapi framework and realized that the best thing about this structure is, one, any field model, and two, extensible plug-ins. Among them, the method of any field model is a little complicated. I haven t figured it out for de...
-
Koa-router route matching problem
koa-router routing settings are as follows,
router.get( user :id )
router.get( user aaa )
cannot access user aaa, is parsed to the parameter aaa ; when the following settings are set,
router.get( user aaa )
router.get( user :id )
c...
Mar.18,2021
-
Front and rear separation, isomorphism, deployment problems?
problem description:
during this period of time, I am working on a project, and Web mainly uses the NodeJs Koa framework, React, React-router,redux, and so on.
the front end React-create-app generates the project and build generates static files. N...
Mar.21,2021
-
XMLHttpRequest: network error 0x2efd, this operation cannot be completed due to error 00002efd
ask me, vue ie11 opens blank, what is the reason for the error? XMLHttpRequest: network error 0x2efd, this operation cannot be completed due to error 00002efd ...
Apr.02,2021
-
Koa2 cross-domain cookie cannot be written to the browser
problem description
Local front-end separation project front-end address localhost:2018 back-end address localhost:3020 framework koa2 when the current end accesses an interface at the backend, the cookie cannot be written to the browser
the envi...
Feb.23,2022
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-2d19fae-2dd0c.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-2d19fae-2dd0c.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?