Skip to content

Express 김세환 sprint6#2

Open
CisThard wants to merge 3 commits intocodeit-sprint-fullstack:express-김세환from
CisThard:express-김세환-sprint6

Hidden character warning

The head ref may contain hidden characters: "express-\uae40\uc138\ud658-sprint6"
Open

Express 김세환 sprint6#2
CisThard wants to merge 3 commits intocodeit-sprint-fullstack:express-김세환from
CisThard:express-김세환-sprint6

Conversation

@CisThard
Copy link

@CisThard CisThard commented Dec 7, 2024

요구사항

기본 요구사항

공통

  • Github에 스프린트 미션 PR을 만들어 주세요.
  • React, Express를 사용해 진행합니다.

백엔드 구현 요구사항

중고마켓

  • Product 스키마를 작성해 주세요.

    • id, name, description, price, tags, createdAt, updatedAt 필드를 가집니다.
    • 필요한 필드가 있다면 자유롭게 추가해 주세요.
  • 상품 등록 API를 만들어 주세요.

    • name, description, price, tags를 입력하여 상품을 등록합니다.
  • 상품 상세 조회 API를 만들어 주세요.

    • id, name, description, price, tags, createdAt를 조회합니다.
  • 상품 수정 API를 만들어 주세요.

    • PATCH 메서드를 사용해 주세요.
  • 상품 삭제 API를 만들어 주세요.

  • 상품 목록 조회 API를 만들어 주세요.

    • id, name, price, createdAt를 조회합니다.
    • offset 방식의 페이지네이션 기능을 포함해 주세요.
    • 최신순(recent)으로 정렬할 수 있습니다.
    • name, description에 포함된 단어로 검색할 수 있습니다.
  • 각 API에 적절한 에러 처리를 해 주세요.

  • 각 API 응답에 적절한 상태 코드를 리턴하도록 해 주세요.

  • .env 파일에 환경 변수를 설정해 주세요.

  • CORS를 설정해 주세요.

  • render.com로 배포해 주세요.

  • MongoDB를 활용해 주세요.

주요 변경사항

스크린샷

멘토에게

  • 셀프 코드 리뷰를 통해 질문 이어가겠습니다.

@CisThard CisThard requested a review from seobew December 7, 2024 07:39
@CisThard CisThard self-assigned this Dec 7, 2024
@CisThard CisThard added 매운맛🔥 뒤는 없습니다. 그냥 필터 없이 말해주세요. 책임은 제가 집니다. 최종 제출 스프린트미션 최종 제출본입니다. labels Dec 7, 2024
Copy link

@seobew seobew left a comment

Choose a reason for hiding this comment

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

세환님 고생하셨습니다!

mock, seed 같은걸 보니 따로 학습을 열심히 하시는 것 같아서 보기 좋습니다 ㅎㅎ
전반적으로 깔끔하게 작성해주셔서 몇가지 코멘트만 드립니다

수고하셨습니다~


app.use(cors());

const dbUser = process.env.DB_USER;
Copy link

Choose a reason for hiding this comment

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

요기부터 아래쪽까지 앞에 빈공간이 있습니다. 요런건 지난번에 말씀드린 prettier를 적용해주시면 깔끔해집니다~

Copy link

Choose a reason for hiding this comment

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

목업데이터를 따로 추가해주시다니 좋네요 👍

Copy link

Choose a reason for hiding this comment

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

totalCount 는 필요없는것 같고, list에 안넣어놓고 data에 그대로 넣어놔도 될것 같아요

Copy link

Choose a reason for hiding this comment

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

seed까지 추가해주시다니 좋습니다 ㅎㅎ

const ProductSchema = new mongoose.Schema(
{
name: {
type: String,
Copy link

Choose a reason for hiding this comment

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

validation 같은것들도 추가해보면 좋을것 같아요~ min, max 등이요!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

매운맛🔥 뒤는 없습니다. 그냥 필터 없이 말해주세요. 책임은 제가 집니다. 최종 제출 스프린트미션 최종 제출본입니다.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants