본문 바로가기
728x90

Node js/Nest js9

[Back-end] Node js or NestJS 기반으로 사용중인 "국내" 회사 리스트 [회사 현황 - 계속 update 예정] 1. 리디https://ridibooks.com/webtoon/recommendation 2. 토스https://toss.im/ 3. 당근https://www.daangn.com/kr/ 4. 클라썸https://www.classum.com/ko/ 5. 설로인https://www.sirloin.co.kr/ 6. 뤼튼https://wrtn.ai/ 7. 모두싸인https://modusign.co.kr/ 8. 아임웹https://imweb.me/ 2025. 3. 28.
nest 에서 metrics data 수집하기 (서버 모니터링 용) 이를 위해 npm 부터 설치하자yarn add prom-client 아래와 같이 서비스 레이어 부터 작성해 준다.(prom-client 에서 얻은 정보를 컨트롤러로 공유하기 위한 목적이다.)import { Injectable } from '@nestjs/common';import * as promClient from 'prom-client';@Injectable()export class BaseService { private readonly collectDefaultMetrics: () => void; private readonly httpRequestsTotal: promClient.Counter; private readonly httpRequestDurationSeconds: promClient.. 2025. 2. 4.
nest 래디스 캐시 redis cache 적용하기 https://docs.nestjs.com/techniques/caching 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.comNest 공식사이트 참고하면 자세한 설명이 나와있다.. 2025. 2. 4.
PrismaClientInitializationError: Unable to require(`/app/node_modules/.prisma/client/libquery_engine-linux-musl.so.node`). 오류 해결방법 위와 같은 오류를 보았다면!https://hub.docker.com/layers/library/node/18-alpine3.20/images/sha256-7000d2e73f938c4f62fdda6d398d7dffd50e6c129409ae2b1a36ccebf9289ffe?context=repo https://hub.docker.com/layers/library/node/18-alpine3.20/images/sha256-7000d2e73f938c4f62fdda6d398d7dffd50e6c129409ae2b1a36ccebf9289ffe?context=repo hub.docker.com dockerfile 수정하면 된다!!node:18-alpine 부분을!! node 버전 20으로!!  [예시]FROM --pl.. 2024. 12. 15.
nest js docker 배포 하기 (nestjs) FROM node:18RUN mkdir -p /var/app WORKDIR /var/app COPY . . RUN npm iRUN npm run build EXPOSE 3000 CMD [ "node", "dist/main.js" ] node version 의 경우 원하는것으로 바꿔주면 되고,좀 더 빠르게 빌드하고 싶으면  아래와 같이 alpine 버전으로 변경해주면 된다.FROM node:18-alpine 2024. 11. 24.
Nest js Test Container 구성!! feat. Mysql 최근 대세(?)로 부각한, 테스트 주도 개발을 하기위해서는,,테스트 코드 작성이 필수 이다. (단위테스트, 통합테스트, e2e 테스트 등) 다만, 여기서 테스트 수행 시 DB가 항상 접속이 되어있어야 할까?는 다소 의문스러운 영역이긴하다왜? 독립적인 구성에서의 테스트가 이루어 져야하기 때문이다.예를 들면, Kafka 를 도입해서 사용중인데, Kafka 가 항상 있어야만 테스트를 돌릴수 있는가?라는 상황이면, github action 내에서 push 시점에서 테스트코드를 돌리기가 힘들것이다.(물론, 배포 후 cypress 등을 이용한 e2e테스트는 다를 수 있다.) 결론적으로는 B/E 단에서 독립적인 테스트 환경이 보장되냐 안되냐가 중요한 것이다.(서론이 다소 길었다.) 자, 그럼 독립적인 환경보장을 하기.. 2024. 11. 23.
728x90