본문 바로가기

반응형

nest

(3)
Nest.js 백엔드 Pipe 사용법에 대해 Nest.js에서 Pipe는 요청(request)의 입력 데이터를 변환하거나 검증하는 데 사용되는 클래스입니다. Pipe는 @Injectable() 데코레이터로 주석이 달린 클래스로 정의되며, PipeTransform 인터페이스를 구현합니다. Pipe의 주요 목적은 다음과 같습니다: 변환 (Transformation): 입력 데이터를 원하는 형식으로 변환합니다. 예를 들어, 문자열을 숫자로 변환하거나 객체의 형태를 변경할 수 있습니다. 검증 (Validation): 입력 데이터가 유효한지 확인합니다. 데이터의 유효성을 검사하고, 유효하지 않은 경우 예외를 throw하여 요청을 중단시킬 수 있습니다. sanitization: 입력 데이터에서 잠재적으로 위험한 문자를 제거하거나 이스케이프 처리하여 보안을 강..
Nest.js Swagger UI , Prisma 사용하기 Prisma를 이용한 Mysql 연결 및 REST API 작성 방법 npm install --save @nestjs/swaggerhttps://docs.nestjs.com/openapi/introduction#installation Documentation | NestJS - A progressive Node.js frameworkNest 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 Programming), FP (Functional Programming), and FRP (Function..
Nest.js의 내장된 코드 테스트 기능 ! Jest 로 하는 유닛테스트 , e2e 테스트 https://jestjs.io/ JestBy ensuring your tests have unique global state, Jest can reliably run tests in parallel. To make things quick, Jest runs previously failed tests first and re-organizes runs based on how long test files take.jestjs.ioJESTJEST는 자바스크립트 코드, 특히 React 애플리케이션을 테스트하기 위한 테스팅 프레임워크입니다. Facebook에서 개발하였으며, 주요 특징은 아래와 같습니다.단순성 (Simplicity) : 별도의 설정없이 바로 테스트 코드 작성이 가능합니다...

반응형