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:
- Middleware (gate guardian)
- Guards (access control)
- Pipes (data validation)
- Route Handler (business logic)