2/23
nest g resource [name]
nest에서 crud 까지 전부해서 만들어주는 갓 명령어
decorator
JS에서는 없었지만 다른 프로그램 언어에서는 많이 쓰이는 기능으로 자세한 설명은 다른 블로그를 참조하자.
@로 시작하며 nest에서 데코레이터로 구현된 코드를 함께 실행해준다.
class CreateUserDto {
@IsEmail()
@MaxLength(60)
readonly email: string;
@IsString()
@Matches(/^[A-Za-z\d!@#$%^&*()]{8,30}$/)
readonly password: string;
}
Context 컨텍스트
JS를 공부하면서 실행 컨텍스트를 많이 들었는데 그 컨텍스트와 다르다. Guard를 사용할때 쓰였다.
https://docs.nestjs.com/fundamentals/execution-context#execution-context
https://velog.io/@from_numpy/NestJS-Execution-context-docs%EB%B2%88%EC%97%AD
[NestJS] Execution context __docs(번역)
NestJS를 학습하며 "가드(Guard)"를 구현하는 과정에서 "Execution context(실행 컨텍스트)" 라는 키워드를 통해 특정 라우터에 원하는 가드를 적용시켜줄 수 있다는 것을 알게 되었다.내가 아는 "실행 컨
velog.io
Documentation | NestJS - A progressive Node.js framework
Nest is a framework for building efficient, scalable Node.js server-side applications. It uses progressive JavaScript, is built with TypeScript and combines elements of OOP (Object Oriented Progamming), FP (Functional Programming), and FRP (Functional Reac
docs.nestjs.com