InterviewSolution
| 1. |
What Is Cascading In Koa.js? |
|
Answer» Middleware functions are functions that have access to the context object and the NEXT middleware function in the APPLICATION’s REQUEST-response cycle. These functions are used to modify request and response objects for tasks like parsing request bodies, adding response HEADERS, etc. Koa goes a step further by yielding 'downstream', then flowing control back 'upstream'. This EFFECT is called cascading. Middleware functions are functions that have access to the context object and the next middleware function in the application’s request-response cycle. These functions are used to modify request and response objects for tasks like parsing request bodies, adding response headers, etc. Koa goes a step further by yielding 'downstream', then flowing control back 'upstream'. This effect is called cascading. |
|