NestJS의 Request cycle에 대해 학습하고자 한다.
먼저 NestJS 공식 문서의 요약은 아래와 같이 나열되어있다.
https://docs.nestjs.com/faq/request-lifecycle
- Incoming request
- Globally bound middleware
- Module bound middleware
- Global guards
- Controller guards
- Route guards
- Global interceptors(pre-controller)
- Controller interceptors(pre-controller)
- Route interceptors(pre-controller)
- Global pipes
- Controller pipes
- Route pipes
- Route parameter pipes
- Controller(method handler)
- Service(if exissts)
- Route interceptor(post-request)
- Controller interceptor(post-request)
- Global interceptor(post-request)
- Exception filters(route, then controller, then global)
- Server response
NestJS Request Cycle