Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Chore: axios 초기설정 #15

Merged
merged 5 commits into from
Jan 7, 2025
Merged

Chore: axios 초기설정 #15

merged 5 commits into from
Jan 7, 2025

Conversation

gwagjiug
Copy link
Member

@gwagjiug gwagjiug commented Jan 6, 2025

📌 Summary

📚 Tasks

  • axios 및 types/axios 종속성 추가
  • axios 인스턴스 설정
  • response 인터셉터 설정
  • eslintrc.cjs 파일 수정

👀 To Reviewer

우선적으로 종속성을 apps/client 에 추가하고, axios 인스턴스를 설정합니다 baseUrl 은 아직 나오지 않아서 임의로 설정해두고 주석 표시 해두었습니다.

response 인터셉터 설정은 모두 주석처리 해놓았고, statuserrorMessage치현님이 보내준 서버 응답 데이터 양식을 참고해서 우선적으로 설정해두었습니다.

statuserrorMessage 를 처리하는 로직같은 경우 interceptors 로직 내부에서 처리하기도 하지만, 상태값과 에러메시지를 핸들링하는 함수를 하나 만들어서 처리하는 것이 어떠한가..?하는 생각이 있습니다

같은 목적인데 코드가 분산되는 것 같다는 걱정도 있는데, 이 부분에 대해서 의견주시면 감사하겠습니다.

📸 Screenshot

서버 응답 형식
image

@gwagjiug gwagjiug added ⚙️ Setting 개발 환경 세팅 지욱 🥁 지욱 labels Jan 6, 2025
@gwagjiug gwagjiug self-assigned this Jan 6, 2025
@gwagjiug gwagjiug requested a review from a team as a code owner January 6, 2025 11:20
@gwagjiug gwagjiug requested review from seueooo, m2na7, daahyunk and bongtta and removed request for a team January 6, 2025 11:20
@gwagjiug gwagjiug linked an issue Jan 6, 2025 that may be closed by this pull request
@m2na7 m2na7 marked this pull request as draft January 6, 2025 15:11
@m2na7 m2na7 marked this pull request as ready for review January 6, 2025 15:12
@gwagjiug gwagjiug marked this pull request as draft January 6, 2025 15:13
@gwagjiug gwagjiug marked this pull request as ready for review January 7, 2025 10:32
Copy link
Contributor

@bongtta bongtta 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
Member

@m2na7 m2na7 left a comment

Choose a reason for hiding this comment

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

👍👍

@gwagjiug gwagjiug merged commit 7383acb into develop Jan 7, 2025
@gwagjiug gwagjiug deleted the init/axios/#14 branch January 7, 2025 14:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
⚙️ Setting 개발 환경 세팅 지욱 🥁 지욱
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Init]: Axios 초기설정
3 participants