X
X
xxx1233212018-06-20 14:39:44
Node.js
xxx123321, 2018-06-20 14:39:44

What does the first parameter in koa's async function mean?

In express.js, the options are clear.
what does the first parameter (ctx) mean in koa and how to use it

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexey Shashenkov, 2018-06-20
@xxx123321

This is the request context, it stores all the request information. It also contains the response parameters - content, headers.
More details here
https://koajs.com/#context

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question