koa2 http proxy middleware:koa2 http代理中间件 源码
koa2-http-proxy-middleware koa2请求转发中间件 用法 初始化中间件 const Koa = require ( 'koa' ) const app = new Koa ( ) const PORT = 3000 const koaBodyparser = require ( 'koa-bodyparser' ) const httpProxy = require ( 'koa2-http-proxy-middleware' ) // 因中间件中需要解析body中的参数,故先添加该中间件 app . use ( koaBodyparser ( ) ) // api
用户评论