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

[Feature/3] API 기본 작업 및 mock server 구현 #4

Merged
merged 4 commits into from
Jun 29, 2024

Conversation

junseublim
Copy link
Collaborator

👀 관련 이슈

✨ 작업한 내용

  • 보드 생성, 보드 조회, 폴라로이드 생성, 폴라로이드 조회 API 만들었습니다.
  • json-server 사용해서 mock api server 작업했습니다.

🌀 PR Point

  • Next.js fetch 처음 사용해봐서 이렇게 하는게 맞나 헷갈리네요.. 수정이나 보완할 점 있으시면 알려주세요ㅎㅎ

🍰 참고사항

  • 서버 컴포넌트에서 API 호출한다는 가정하에 fetch로만 구현하였습니다. 클라이언트 컴포넌트에서 호출이 필요한 경우 route handler를 추가하거나 Server Action으로 사용할 수 있도록 "use server"를 파일 윗부분에 추가해야될 수도 있습니다.
  • mock 서버 사용 방법
    • npm run mock:start 실행합니다.
    • mock을 사용하고자 하는 api에 useMocked 옵션을 true로 설정합니다.
    • 해당 API에 한해서 mock server를 사용합니다.

@junseublim junseublim added the enhancement New feature or request label Jun 28, 2024
@junseublim junseublim self-assigned this Jun 28, 2024
@hwanheejung
Copy link
Member

확인해봤는데 딱히 보완할 점은 없는 것 같습니다!

@hwanheejung hwanheejung merged commit 08decd4 into develop Jun 29, 2024
@hwanheejung hwanheejung deleted the feature/3 branch June 29, 2024 07:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants