[NestJS] Controller


[NestJS] Controller

Controller 컨트롤러는 들어오는 요청을 처리하고 클라이언트에 응답을 반환한다. 각각 알맞은 controller로 요청을 받고 반환해줌 controller는 @Controller 데코레이터로 클래스를 데코레이션하여 정의된다. boards Controllers 생성하기 nest : using nestcil g : generate controller : controller schematic boards : name of the schematic //컨트롤러의 이름 --no-spec : 테스트를 위한 소스 코드 생성 x CLI로 명령어 입력 시 Controller 만드는 순서 1. cil는 먼저 boards 폴더 찾기 2. boards 폴더 안에 controller 파일 생성 3. boards 폴더 안에 module 파일 찾기 4. boards 파일 안에다가 controller 넣어주기 Handler Handler는 @G..........



원문링크 : [NestJS] Controller