All quizzes
Free quiz · 48 questions in the bank

Fastify quiz

Test your Fastify knowledge with a free interactive quiz — 48 questions with answers and explanations. No signup needed to play.

Question 1/5Score 0

In a Fastify route handler declared as `async (request, reply) => {...}`, how do you send a JSON response?

Questions in this quiz
  1. In a Fastify route handler declared as `async (request, reply) => {...}`, how do you send a JSON response?
  2. What object gives access to route parameters like `:id` in a Fastify handler?
  3. How do you start listening for requests on port 3000 in Fastify?
  4. Which of these correctly registers a Fastify plugin with configuration options?
  5. What is the role of the `onRequest` hook in the Fastify request lifecycle?
  6. How do you register a basic GET route in Fastify?
  7. What does `app.setErrorHandler(fn)` do?
  8. What is the effect of specifying a `response` schema for status code 200 on a Fastify route?
  9. Why would a Fastify app use `@fastify/cors` instead of hand-writing CORS header logic in every route?
  10. What does app.register() do in Fastify?
  11. How do you set a custom HTTP status code before sending a response in Fastify?
  12. What logging library does Fastify use internally by default, exposed via request.log?
Gaps to close?
Read the curated Fastify notes — core concepts, patterns, interview prep.
Fastify notes

More quizzes

.NET.NET MAUIAbsintheAccessibilityActixActix Web