Chapter quiz · Production

Test what you learned.

8 questions on Production. Pass 70% to clear the chapter.

← Review chapter lessons

Quiz

Testing & Production — Chapter Quiz

Eight questions on supertest, pino logging, health/metrics endpoints, DEBUG=koa*, the missing-await-next bug, compression, cluster, app.proxy, and Docker deployment.

0/ 9
  1. Question 1
    1

    How do you use supertest to test a Koa app without starting a real server?

  2. Question 2
    2

    What does setting app.proxy = true do?

  3. Question 3
    3

    Which environment variable enables Koa's internal debug logging?

  4. Question 4
    4

    A route handler returns 404 for every request even though it clearly sets ctx.body. What is the most common cause?

  5. Question 5
    5

    Why is pino preferred over console.log for production logging in Koa apps?

  6. Question 6
    6

    A /healthz endpoint should return 200 only when the app and its critical dependencies (DB, cache) are reachable.

  7. Question 7
    7

    Use the koa-___ package to gzip/deflate responses and reduce payload sizes in production.

  8. Question 8
    8

    Which practices improve Koa app reliability and observability in production?

    Select all that apply.

Pick an answer — instant feedback as you go.