Skip to content

Conversation

@ChoiSeungWoo98
Copy link
Contributor

Copy link
Contributor

Choose a reason for hiding this comment

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

uvicorn app.main:app --reload

앞부분에 cd app이라고 되어있긴 한데 앞부분(cd app)을 지우던지 여기서 app.main:appmain:app으로 해야할 지 정해야할 것 같습니다.

Copy link
Contributor

Choose a reason for hiding this comment

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

그리고 동적포트라서
/app 인경우
python main.py or uvicorn main:app --host 0.0.0.0 --port 39722 --reload 이렇게 가야 되던데 그렇지 않나요?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

  1. 이 부분 원래 리드미에 적혀있는 대로 cd app 해서 진행하니 app 내부에 생기는 문제가 발생하더라고요.
    그래서 현재 부분으로 수정했습니다.
    cd app 부분이 clone한 프로젝트로 이해하고 넘어갔는데 아닌가요??

  2. 저 부분 포트를 지정해줄 필요가 있나요? main.py에서 지정해주기 때문에 main 위치만 지정해주면 되는 거 아닌가요??

Copy link
Contributor

Choose a reason for hiding this comment

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

  1. 이렇게 상태코드랑 비즈니스 코드를 나누는건 어떤 이점이 있는건가요? (그냥 궁금)
  2. 메시지 포맷팅부분은 이해가 되지않아 설명 부탁드립니다. 나의 AI는 저렇게 하면 안된다고 나오네요.
    이 코드는 메시지에 포맷 자리가 정확히 있어야만 인자를 넣을 수 있어요. 없는데 넣으면 터집니다. 이렇게요!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

  1. 상태코드를 나누는 이유는 각각의 역할과 책임을 분리하고 관리 용이성, 프론트와 명확한 소통 때문이 나눈 것 입니다.
  2. 이해하지 못했습니다..

Copy link
Contributor

Choose a reason for hiding this comment

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

이제 앞으로 #테스트 라우터 부분처럼 작성해야하는거죠?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

이 부분은 라우터 pr과 합쳐지면 바뀌어야합니다.

Copy link
Contributor

Choose a reason for hiding this comment

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

자, 여기까지의 흐름이
클라이언트 요청 → API 실행 -> API 내부에서 ResponseMessage.success(...) 호출 -> CommonCode에서 상태코드/메시지 가져옴 (code.code, code.get_message) -> ResponseMessage FastAPI 응답으로 리턴
맞나요?

Copy link
Contributor Author

@ChoiSeungWoo98 ChoiSeungWoo98 left a comment

Choose a reason for hiding this comment

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

리뷰 감사합니다.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

  1. 이 부분 원래 리드미에 적혀있는 대로 cd app 해서 진행하니 app 내부에 생기는 문제가 발생하더라고요.
    그래서 현재 부분으로 수정했습니다.
    cd app 부분이 clone한 프로젝트로 이해하고 넘어갔는데 아닌가요??

  2. 저 부분 포트를 지정해줄 필요가 있나요? main.py에서 지정해주기 때문에 main 위치만 지정해주면 되는 거 아닌가요??

Copy link
Contributor Author

Choose a reason for hiding this comment

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

  1. 상태코드를 나누는 이유는 각각의 역할과 책임을 분리하고 관리 용이성, 프론트와 명확한 소통 때문이 나눈 것 입니다.
  2. 이해하지 못했습니다..

Copy link
Contributor Author

Choose a reason for hiding this comment

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

이 부분은 라우터 pr과 합쳐지면 바뀌어야합니다.

@ChoiSeungWoo98 ChoiSeungWoo98 force-pushed the feature/common-response branch from dfa9f45 to d059b53 Compare August 2, 2025 06:15
@apaals2 apaals2 merged commit 77d505a into develop Aug 2, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants