Skip to content

[함헌규] sprint11#32

Merged
pers0n4 merged 42 commits intocodeit-sprint-fullstack:express-함헌규from
heonq:express-함헌규-sprint11
Feb 17, 2025

Hidden character warning

The head ref may contain hidden characters: "express-\ud568\ud5cc\uaddc-sprint11"
Merged

[함헌규] sprint11#32
pers0n4 merged 42 commits intocodeit-sprint-fullstack:express-함헌규from
heonq:express-함헌규-sprint11

Conversation

@heonq
Copy link
Collaborator

@heonq heonq commented Feb 9, 2025

공통

  • Github에 위클리 미션 PR을 만들어 주세요
  • React 및 Express를 사용해 진행합니다
  • TypeScript를 활용해 프로젝트의 필요한 곳에 타입을 명시해 주세요
  • any 타입의 사용은 최소화해 주세요
  • 복잡한 객체 구조나 배열 구조를 가진 변수에 인터페이스 또는 타입 별칭을 사용하세요
  • Union, Intersection, Generics 등 고급 타입을 적극적으로 사용해 주세요
  • 타입 별칭 또는 유틸리티 타입을 사용해 타입 복잡성을 줄여주세요
  • 타입스크립트 컴파일러가 에러 없이 정상적으로 작동해야 합니다

백엔드

  • 기존 Express.js 프로젝트를 타입스크립트 프로젝트로 마이그레이션 해주세요
  • tsconfig.json 파일을 생성하고, 필요한 컴파일러 옵션을 설정해야 합니다. (예: outDir)
  • TypeScript 관련 명령어를 package.json에 설정해 주세요. (예: 빌드 및 개발 서버 실행 명령어)
  • ts-nodenodemon을 사용하여 개발 환경을 구성합니다
  • nodemon과 함께 ts-node를 사용하여 .ts 파일이 변경될 때 서버를 자동으로 재시작하도록 설정합니다
  • MongoosePrisma 등 ORM을 사용하는 경우, 모델에 대한 인터페이스 또는 타입을 정의합니다
  • 필요한 경우, declare를 사용하여 타입을 오버라이드하거나 확장합니다

주요 변경사항

  • service,controller 책임 분리
  • 기존에 accessToken,refreshToken을 직접 응답 방식에서 쿠키에 담아 응답하는 방식으로 변경

멘토에게

  • 남겨주신 리뷰 중 스웨거 부분은 다음 미션에 적용해보도록 하겠습니다.

heonq and others added 30 commits January 23, 2025 14:39
@heonq heonq changed the base branch from main to express-함헌규 February 9, 2025 05:31
@heonq heonq self-assigned this Feb 9, 2025
@heonq heonq requested a review from pers0n4 February 9, 2025 06:31
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

짧게짧게 끝나는 코드들은 적당히 모아도 괜찮을 것 같습니다.
자바처럼 파일당 클래스 하나라는 제약이 없으니... 저는 exception class류는 분류별로 모아서 관리하기도 해요.

Comment on lines +21 to +26
const articleService = new ArticleService(
new ArticleRepository(),
new LikeRepository(),
new CommentRepository(),
prismaClient,
);
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

이런 코드를 볼 때면 항상 JVM 진영의 스프링에서 '딸깍'으로 DI를 할 수 있다는 점이 부러워지곤 하는 것 같아요. ㅋㅋ
저는 Node나 Python에서는 따로 DI 라이브러리를 사용하지 않는다면 index에서 인스턴스를 하나 만들어서 반환하는 식으로 사용하곤 했습니다.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

이 부분을 제외하고 모두 리뷰 주신 내용 반영하였습니다! 이부분도 이후에 한번 수정해보도록 하겠습니다 감사합니다!

@pers0n4 pers0n4 merged commit 43c641f into codeit-sprint-fullstack:express-함헌규 Feb 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants