koa-better-body-without-git

1.0.2 • Public • Published

koa-better-body-without-git

This is a substitute for koa-better-body, but without koa-body-parser. Faster download speed

Why?

Due to the dependency source of koa-body-parsers in GitHub, Unable to adapt to CDN nodes, resulting in particularly slow download speed! Even unable to download! And the author of koa-better-body no longer maintains the project..., so kill it~

 "dependencies": {
    "extend-shallow": "^3.0.2",
    "formidable": "^1.2.1",
    "koa-body-parsers": "tunnckocore/body-parsers#patch-1"
  },

install

npm i koa-better-body-without-git

before

const body = require('koa-better-body');
const convert = require('koa-convert');

server.use(
    convert(body({
        uploadDir: config.uploadDir,
        keepExtensions: true,
        formLimit: "5mb",
        jsonLimit: "5mb"
    }))
)

now

const body = require('koa-better-body-without-git');
const convert = require('koa-convert');

// here is call body.default
server.use(
    convert(body.default({
        uploadDir: config.uploadDir,
        keepExtensions: true,
        formLimit: "5mb",
        jsonLimit: "5mb"
    }))
)

Readme

Keywords

none

Package Sidebar

Install

npm i koa-better-body-without-git

Weekly Downloads

3

Version

1.0.2

License

none

Unpacked Size

25.3 kB

Total Files

10

Last publish

Collaborators

  • wangjue666