Manual/Node.js
2021. 12. 19.
Koa ctx (context) Manual
ctx : Context의 줄임말로 웹 요청과 응답에 관한 정보를 지닌 객체 app.use(async ctx => { ctx; // is the Context ctx.request; // is a Koa Request ctx.response; // is a Koa Response }); Many of the context's accessors and methods simply delegate to their ctx.request or ctx.response equivalents for convenience, and are otherwise identical. For example ctx.type and ctx.length delegate to the response object, and ctx.path ..