NestJs Guard

roglog·2021년 4월 2일
0

SetMetadata


  • metadata를 set함
  • SetMetadata(key, value)

APP_GUARD


  • nestjs에서 제공하는 constants
  • gurad를 모든 앱에서 사용하고 싶으면 APP_GUARD를 provide해주면 된다.
  • Ex)
  @Module({
      providers:[
          {
              provide: APP_GUARD,
              useClass: AuthGuard,
          }
      ]
  })
profile
Full Stack Developer 📚

0개의 댓글