전체 글
-
nestjs-test-coverage에서 제외 파일 설정Nest.js/TDD 2024. 3. 9. 20:17
- Reference https://jestjs.io/docs/configuration#coveragepathignorepatterns-arraystring Configuring Jest · Jest The Jest philosophy is to work great by default, but sometimes you just need more configuration power. jestjs.io //package.json { ... "coverageDirectory": "../coverage", "testEnvironment": "node", "coveragePathIgnorePatterns": [ "/main.ts", "/app.module.ts" ] } }
-
NestJS class-validator 사용시 일관성 있는 에러처리Nest.js 2024. 3. 8. 12:25
class-vaildator Dto 중첩 객체 에러 처리 문제{ "success": false, "timestamp": "2024-05-16T03:59:41.456Z", "status": 400, "message": "Validation failed", "path": "/api/groups/75aca3da-1dac-48ef-84b8-cdf1be8fe37d/schedules", "errors": [ { "field": "periods", "message": "값이 없습니다!", "children": [ {}, {}, { "field": "tourisms", "message": "값이 없습니다!"..
-
-
-
-
NestJS 개발시 tsconfig 설정시 strictNullChecks를 true로 하지 않을때Nest.js 2024. 2. 24. 15:04
NestJS 프로젝트시에 tsconfig 설정시 strictNullChecks를 true나 또는 strict true로 설정하지 않고 프로젝트를 하게 되면 typeorm의 findOne 함수를 예로 들었을때 typeorm의 type 스펙과 다른 결과가 다를 수 있다. findOne(options: FindOneOptions): Promise; typeorm의 findOne 또는 findOneById등 메소드들의 type의 리턴값은 Promise 이다. 그러나 strictNullChecks를 false로 지정 했을경우 원래 당연히 PostsModel | null 이렇게 추론 되어야 하는데 strictNullChecks를 false로 지정 했기 때문에 PostsModel로 추론 되는걸 알 수 있다. 결론적으..
-
NestJS에서 WebSockets 파트에서 AdaptersNest.js 2024. 2. 21. 20:50
https://docs.nestjs.com/websockets/adapter 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 (Functional Readocs.nestjs.com 공식문서에서 websocket에서 adapter ..
-
<w> [webpack.cache.PackFileCacheStrategy]Next.js 2024. 2. 14. 12:18
해당 에러는 내가 next.config.js 파일을 수정 한 이후에 발생했다. 개발환경은 docker이고 Dockerfile은 다음과 같다. FROM node:18-alpine3.18 WORKDIR /app COPY *.* /app RUN npm install COPY . /app RUN npm run build CMD [ "npm" , "run" , "dev"] 열심히 구글링 해본 결과 해당 오류를 제거 하려면 .next파일을 delete 한후 다시 docker 파일을 실행하니까 해결 됬다!