koa2目录结构
application => app(实例化的应用)
context => ctx(实例上下文)
request => req(由原生 request 事件的 http.IncomingMessage 类过滤而来,在 koa 中即为挂载在 ctx 下的 ctx.req 请求流)
response => res(由原生 request 事件的 http.ServerResponse 类过滤而来,在 koa 中即为挂载在 ctx 下的 ctx.res 响应流)
koa2----源码解析概述
最新推荐文章于 2024-12-02 15:48:35 发布