[FS_11_김민성] Sprint-MIssion-5(BE)#11
Open
alstjddl0513-sys wants to merge 6 commits intocodeit-sprint-fullstack:express-김민성from
Hidden character warning
The head ref may contain hidden characters: "express-\uae40\ubbfc\uc131-sprint5"
Open
[FS_11_김민성] Sprint-MIssion-5(BE)#11alstjddl0513-sys wants to merge 6 commits intocodeit-sprint-fullstack:express-김민성from
alstjddl0513-sys wants to merge 6 commits intocodeit-sprint-fullstack:express-김민성from
Conversation
wseungjin
approved these changes
Jan 20, 2026
| "no-var": "error", | ||
| semi: ["error", "always"], | ||
| quotes: ["error", "single"], | ||
| }, |
| "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", |
Collaborator
There was a problem hiding this comment.
pre-commit hook 도 해보시면 좋을거 같습니다.
| export const cors = (req, res, next) => { | ||
| const origin = req.headers.origin; | ||
|
|
||
| const whiteList = [ |
| @@ -0,0 +1,32 @@ | |||
| import { isProduction } from '#config'; | |||
|
|
|||
| export const cors = (req, res, next) => { | |||
| }); | ||
| } | ||
|
|
||
| if (error.name === 'ValidationError') { |
Collaborator
There was a problem hiding this comment.
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}`); | |||
|
|
||
| productRouter.delete('/items/:id', async (req, res, next) => { | ||
| try { | ||
| const deletedProduct = await Product.findByIdAndDelete(req.params.id); |
Collaborator
There was a problem hiding this comment.
findByIdAndDelete
delete : true 이런식으로 합니다
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
멘토님께 전하는 말
요구사항 체크리스트
Github에 스프린트 미션 PR을 만들어 주세요.
React, Express를 사용해 진행합니다.
Product 스키마를 작성해 주세요.
상품 등록 API를 만들어 주세요.
상품 상세 조회 API를 만들어 주세요.
상품 수정 API를 만들어 주세요.
PATCH 메서드를 사용해 주세요.
상품 삭제 API를 만들어 주세요.
상품 목록 조회 API를 만들어 주세요.
각 API 응답에 적절한 상태 코드를 리턴하도록 해 주세요.
.env 파일에 환경 변수를 설정해 주세요.
CORS를 설정해 주세요.
render.com로 배포해 주세요.
MongoDB를 활용해 주세요.