Put in order · NestJS course · Module 2: Routing and Request Lifecycle

Request Lifecycle Stages Order

Order the stages of an HTTP request lifecycle in NestJS from first to last:

Items to put in order

  • Guards (access control)
  • Route Handler (business logic)
  • Pipes (data validation)
  • Middleware (gate guardian)
Show the answer

Correct order:

  1. Middleware (gate guardian)
  2. Guards (access control)
  3. Pipes (data validation)
  4. Route Handler (business logic)