반응형 nestjs3 [nestjs] nestjs : middleware logger 사용하기 nestjs logger "middleware logger 설정" middleware logger 미들웨어는 ROOT 핸들러 앞에 호출되는 함수이다. 미들웨어 기능은 등록된 순서대로 순차적으로 실행되며, 로깅, 인증, 권한 부여, 데이터 변환, 오류 처리 등의 작업을 수행할 수 있다. 미들웨어가 인터셉터보다 먼저 실행된다. 미들웨어 로그는 전역로거로 설정할수 있다. https://docs.nestjs.com/middleware Documentation | NestJS - A progressive Node.js framework Nest is a framework for building efficient, scalable Node.js server-side applications. It uses progr.. 2023. 8. 22. [nestjs] nestjs : typeorm : 데이터베이스 연동 nestjs config 설정 "nestjs typeorm3 postgresql 연동" nestjs typeorm 개념 TypeORM은 TypeScript와 JavaScript를 위한 ORM(Object-Relational Mapping) 라이브러리 이다. 데이터베이스 레코드를 일반 TypeScript 오브젝트인 것처럼 작업할 수 있도록 하여 관계형 데이터베이스와의 상호 작용을 단순화합니다. nestjs typeorm 설치 아래와 같이 typeorm 모듈과 pg 모듈을 설치한다. $ npm install pg typeorm @nestjs/typeorm --save Tip! 설치시 반응이 없거나 아래 이미지와 같은 오류가 발생한다면 아래 내용을 확인바란다. 인터넷이 KT망일경우 현재까지 ts-jest가 설.. 2023. 8. 21. [nestjs] nestjs : typeorm : configuration 설정 nestjs config 설정 "nestjs configuration yaml 사용" nestjs configuration nestjs의 configuration는 쉽게말해서 개발환경과 운영환경 분리를 위한 것이다. 흔히 Spring에서 profile 서버스 같은것이다. local, dev, prod 처럼 환경을 분리한다. nestjs의 configuration 하는방법은 .env방식 또는 yaml을 사용한다. 본글에서는 yaml을 사용해서 포스팅 하겠다. 아래는 공식 document 사이트이니 추가적인 정보가 필요하면 참고하면된다. https://docs.nestjs.com/techniques/configuration Documentation | NestJS - A progressive Node.js .. 2023. 8. 18. 이전 1 다음 반응형