Chapter quiz · Fastify Foundations

Test what you learned.

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

← Review chapter lessons

Quiz

Fastify Foundations — Chapter Quiz

Eight questions on installing Fastify, routes, async handlers, the reply API, the Pino logger, env config, and TypeScript generics.

0/ 9
  1. Question 1
    1

    What is Fastify, in one sentence?

  2. Question 2
    2

    Which package do you install for a minimal Fastify app?

  3. Question 3
    3

    What status code does this handler return on success?

    app.get('/', async () => {
      return { hello: 'world' };
    });
    
  4. Question 4
    4

    An async handler that throws an Error will automatically produce a 500 response with a JSON error payload.

  5. Question 5
    5

    Which logger does Fastify use out of the box?

  6. Question 6
    6

    To set a 201 status before returning JSON, you write reply.____(201).send(data).

  7. Question 7
    7

    What does @fastify/env do?

  8. Question 8
    8

    Which of these are valid ways to type a request body in TypeScript with Fastify?

    Select all that apply.

Pick an answer — instant feedback as you go.