Skip to content

[FS_11_김민성] Sprint-MIssion-5(BE)#11

Open
alstjddl0513-sys wants to merge 6 commits intocodeit-sprint-fullstack:express-김민성from
alstjddl0513-sys:express-김민성-sprint5

Hidden character warning

The head ref may contain hidden characters: "express-\uae40\ubbfc\uc131-sprint5"
Open

[FS_11_김민성] Sprint-MIssion-5(BE)#11
alstjddl0513-sys wants to merge 6 commits intocodeit-sprint-fullstack:express-김민성from
alstjddl0513-sys:express-김민성-sprint5

Conversation

@alstjddl0513-sys
Copy link
Collaborator

@alstjddl0513-sys alstjddl0513-sys commented Jan 20, 2026

멘토님께 전하는 말

  • 백엔드까지 밖에 구현하지 못했습니다. 늦었지만 백엔드만이라도 코드리뷰 부탁드리겠습니다! 감사합니다!

요구사항 체크리스트

  • 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를 활용해 주세요.

@alstjddl0513-sys alstjddl0513-sys self-assigned this Jan 20, 2026
@alstjddl0513-sys alstjddl0513-sys added 매운맛🔥 뒤는 없습니다. 그냥 필터 없이 말해주세요. 책임은 제가 집니다. 미완성 스프린트 미션 제출일이지만 미완성했습니다. 죄송합니다. 제출일 이후 제출한PR 제출일(일요일) 이후에 늦게 제출한 PR입니다. labels Jan 20, 2026
@alstjddl0513-sys alstjddl0513-sys changed the base branch from main to express-김민성 January 20, 2026 04:39
@alstjddl0513-sys alstjddl0513-sys added 최종제출 스프린트 미션 최종 제출 PR입니다. 코드리뷰 및 평가해주세요! and removed 미완성 스프린트 미션 제출일이지만 미완성했습니다. 죄송합니다. labels Jan 20, 2026
Copy link
Collaborator

@wseungjin wseungjin left a comment

Choose a reason for hiding this comment

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

수고하셨습니다~

"no-var": "error",
semi: ["error", "always"],
quotes: ["error", "single"],
},
Copy link
Collaborator

Choose a reason for hiding this comment

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

biome 보시면 좋을거 같고

"dev": "nodemon --env-file=./env/.env.development src/server.js",
"start": "node dist/server.js",
"start:local": "node --env-file=./env/.env.production dist/server.js",
"format": "prettier --write src/**/*.js",
Copy link
Collaborator

Choose a reason for hiding this comment

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

auto save하면 됩니다.

Copy link
Collaborator

Choose a reason for hiding this comment

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

pre-commit hook 도 해보시면 좋을거 같습니다.

export const cors = (req, res, next) => {
const origin = req.headers.origin;

const whiteList = [
Copy link
Collaborator

Choose a reason for hiding this comment

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

굳이 할당하고 재할당할 필요 없음

@@ -0,0 +1,32 @@
import { isProduction } from '#config';

export const cors = (req, res, next) => {
Copy link
Collaborator

Choose a reason for hiding this comment

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

👍

});
}

if (error.name === 'ValidationError') {
Copy link
Collaborator

Choose a reason for hiding this comment

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

ValidationError
enum , const 로 관리를 해서 사용하면 좋을거같아요.

@@ -0,0 +1,6 @@
export const logger = (req, res, next) => {
const timestamp = new Date().toISOString();
console.log(`[${timestamp}] ${req.method} ${req.url}`);
Copy link
Collaborator

Choose a reason for hiding this comment

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

파일 로깅, 로깅 서버


productRouter.delete('/items/:id', async (req, res, next) => {
try {
const deletedProduct = await Product.findByIdAndDelete(req.params.id);
Copy link
Collaborator

Choose a reason for hiding this comment

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

findByIdAndDelete

delete : true 이런식으로 합니다

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

Labels

매운맛🔥 뒤는 없습니다. 그냥 필터 없이 말해주세요. 책임은 제가 집니다. 제출일 이후 제출한PR 제출일(일요일) 이후에 늦게 제출한 PR입니다. 최종제출 스프린트 미션 최종 제출 PR입니다. 코드리뷰 및 평가해주세요!

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants