Controller
Nest의 Controller는 들어오는 요청 을 처리 하고 클라이언트에 응답 을 반환 하는 역할. 기본 컨트롤러를 만들기 위해 클래스와 데코레이터 를 사용 쓰다보니까 점점 눈에 익는다.. import { Controller, Get, Query, Post, Body, Put, Param, Delete } from '@nestjs/common'; import { CreateCatDto, UpdateCatDto, ListAllEntities } from './dto'; @Controller('cats') //localhost:3000/cats export class CatsController { @Post() create(@Body() createCatDto: CreateCatDto) { return 'T..
2022.09.04