Chapter quiz · Data & Realtime

Test what you learned.

8 questions on Data & Realtime. Pass 70% to clear the chapter.

← Review chapter lessons

Quiz

Data, Files & Real-Time — Chapter Quiz

Eight questions on DB pooling, ORM, multipart uploads, koa-static, streaming ctx.body, SSE, websockets, ETag caching, and background jobs.

0/ 9
  1. Question 1
    1

    Why should you use a connection pool instead of creating a new DB connection per request?

  2. Question 2
    2

    How do you serve a Node.js ReadStream as the HTTP response body in Koa?

  3. Question 3
    3

    Which package handles multipart/form-data file uploads in a Koa app?

  4. Question 4
    4

    How do you implement Server-Sent Events (SSE) in Koa?

  5. Question 5
    5

    How do you attach a WebSocket server to a Koa app without a separate port?

  6. Question 6
    6

    Setting ctx.set('ETag', hash) and checking ctx.fresh lets Koa respond with 304 Not Modified for unchanged resources.

  7. Question 7
    7

    Use koa-___ to serve files from a directory as static assets with correct MIME types and caching headers.

  8. Question 8
    8

    Which patterns are appropriate for running background jobs from a Koa app?

    Select all that apply.

Pick an answer — instant feedback as you go.