NestJS request lifecycle

오픈소스·2022년 3월 19일
0

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 exists)
        • Route interceptor (post-request)
        • Controller interceptor (post-request)
        • Global interceptor (post-request)
    • Exception filters (route, then controller, then global)
  • Server response

  • @UseGuards(AuthGuard)
  • @UseInterceptors(LoggingInterceptor)
  • app.useGlobalPipes(new ValidationPipe());
  • app.useGlobalFilters(new HttpExceptionFilter()); @Catch(HttpException)

https://velog.io/@haron/NestJS-Lifecycle-Events
https://velog.io/@haron/NestJS-Lifecycle-Events

0개의 댓글