Chapter quiz · Koa Foundations

Test what you learned.

8 questions on Koa Foundations. Pass 70% to clear the chapter.

← Review chapter lessons

Quiz

Koa Foundations — Chapter Quiz

Eight questions on ctx, app.use, ctx.body, request/response aliases, cascading basics, async middleware, app.callback, and app.keys.

0/ 9
  1. Question 1
    1

    What does Koa store on ctx that Express does not provide out of the box?

  2. Question 2
    2

    Which one-liner sets a plain-text response body in Koa?

  3. Question 3
    3

    What is ctx.request.url an alias for inside Koa's context?

  4. Question 4
    4

    What does app.callback() return?

  5. Question 5
    5

    Why must Koa middleware functions be async (or return a Promise) when they call await next()?

  6. Question 6
    6

    app.use() accepts only one middleware function per call in Koa 2.

  7. Question 7
    7

    Set app.___ to an array of secret strings so Koa can sign cookies with ctx.cookies.set('name', 'val', { signed: true }).

  8. Question 8
    8

    Which of the following are valid ways to start a Koa HTTP server?

    Select all that apply.

Pick an answer — instant feedback as you go.