Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

@bpframework/middleware-koa-bodyparser

bpcloud157MIT0.0.3TypeScript support: included

bodyparser middleware of bpframework

bpframework, bodyparser

readme

koa bodyparser middleware in bpframework.

Middleware specification

https://github.com/bpcloud/middleware

usage

Setup.

import { Application } from 'bpframework';
import * as middleware_bodyparser from '@bpframework/middleware-koa-bodyparser';

// bodyparser middleware is used by default.
Application.use(middleware_bodyparser.middleware({
  onErrorBodyParser: (err:any, ctx:koa.Context)=>{
    ctx.response.status = 415;
  }
}));
Application.runKoa(...);