-
Notifications
You must be signed in to change notification settings - Fork 1
[REST API 연동 React 앱] 오상현 제출합니다 #25
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
Merged
Merged
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
403205f
feat: TMDB API 통신 환경 설정 및 테스트 코드 추가
ohsanghy09 cdb1863
feat : 인기 영화 페이지 가져오기 구현
ohsanghy09 5c0cfed
feat : 키워드 영화 검색 기능 구현
ohsanghy09 76a34fc
feat : console.log 제거
ohsanghy09 85cc902
feat : StrictMode 추가
ohsanghy09 d2f15b4
feat : 다크모드 CSS 적용
ohsanghy09 282991d
feat : 검색 영화 유무 처리 추가
ohsanghy09 5276f1c
feat : .env.example 파일 생성 및 README.md에 내용 반영
ohsanghy09 7fc61a5
feat : html lang=ko 변경
ohsanghy09 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| VITE_TMDB_ACCESS_TOKEN=your_api_key_here | ||
| VITE_TMDB_BASE_URL=https://api.themoviedb.org/3 | ||
| VITE_TMDB_IMAGE_BASE_URL=https://image.tmdb.org/t/p/w500 |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,27 @@ | ||
| # Logs | ||
| logs | ||
| *.log | ||
| npm-debug.log* | ||
| yarn-debug.log* | ||
| yarn-error.log* | ||
| pnpm-debug.log* | ||
| lerna-debug.log* | ||
|
|
||
| node_modules | ||
| dist | ||
| dist-ssr | ||
| *.local | ||
|
|
||
| # Environment variables | ||
| .env | ||
|
|
||
| # Editor directories and files | ||
| .vscode/* | ||
| !.vscode/extensions.json | ||
| .idea | ||
| .DS_Store | ||
| *.suo | ||
| *.ntvs* | ||
| *.njsproj | ||
| *.sln | ||
| *.sw? | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 네~ 이런 초안 좋네요 👍🏻 코드를 읽게 될 사람은 물론이고 AI에게도 더 빠르게 맥락을 찾는 데 도움을 줄 거라 생각해요 |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,38 @@ | ||
| ## 환경 변수 설정 | ||
|
|
||
| 이 프로젝트는 TMDB API를 사용하기 때문에 실행 전에 환경 변수 설정이 필요합니다. | ||
|
|
||
| 보안상 실제 API 키가 들어 있는 `.env` 파일은 GitHub에 업로드하지 않습니다. | ||
| 대신 프로젝트에 포함된 `.env.example` 파일을 참고하여 직접 `.env` 파일을 생성해야 합니다. | ||
|
|
||
| ### 1. `.env` 파일 생성 | ||
|
|
||
| 프로젝트 루트 경로에 `.env` 파일을 생성합니다. | ||
|
|
||
| ```bash | ||
| .env | ||
| ``` | ||
|
|
||
| ### 2. `.env.example` 참고하여 값 입력 | ||
|
|
||
| `.env.example` 파일에는 필요한 환경 변수 형식이 작성되어 있습니다. | ||
|
|
||
| ```env | ||
| VITE_TMDB_BASE_URL=https://api.themoviedb.org/3 | ||
| VITE_TMDB_ACCESS_TOKEN=your_api_key_here | ||
| VITE_TMDB_IMAGE_BASE_URL=https://image.tmdb.org/t/p/w500 | ||
| ``` | ||
|
|
||
| 위 내용을 참고하여 `.env` 파일에 본인의 TMDB Access Token을 입력합니다. | ||
|
|
||
| ```env | ||
| VITE_TMDB_BASE_URL=https://api.themoviedb.org/3 | ||
| VITE_TMDB_ACCESS_TOKEN=본인의_TMDB_ACCESS_TOKEN | ||
| VITE_TMDB_IMAGE_BASE_URL=https://image.tmdb.org/t/p/w500 | ||
| ``` | ||
|
|
||
| ### 3. 주의사항 | ||
|
|
||
| `.env` 파일에는 개인 API 키와 같은 민감한 정보가 포함될 수 있으므로 GitHub에 업로드하면 안 됩니다. | ||
|
|
||
| 따라서 `.env` 파일은 `.gitignore`에 추가하여 관리하고, 다른 사용자는 `.env.example` 파일을 참고해 각자 환경 변수를 설정해야 합니다. |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,21 @@ | ||
| import js from '@eslint/js' | ||
| import globals from 'globals' | ||
| import reactHooks from 'eslint-plugin-react-hooks' | ||
| import reactRefresh from 'eslint-plugin-react-refresh' | ||
| import { defineConfig, globalIgnores } from 'eslint/config' | ||
|
|
||
| export default defineConfig([ | ||
| globalIgnores(['dist']), | ||
| { | ||
| files: ['**/*.{js,jsx}'], | ||
| extends: [ | ||
| js.configs.recommended, | ||
| reactHooks.configs.flat.recommended, | ||
| reactRefresh.configs.vite, | ||
| ], | ||
| languageOptions: { | ||
| globals: globals.browser, | ||
| parserOptions: { ecmaFeatures: { jsx: 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
| <!doctype html> | ||
| <html lang="ko"> | ||
| <head> | ||
| <meta charset="UTF-8" /> | ||
| <meta name="viewport" content="width=device-width, initial-scale=1.0" /> | ||
| <title>react-api</title> | ||
| </head> | ||
| <body> | ||
| <div id="root"></div> | ||
| <script type="module" src="/src/main.jsx"></script> | ||
| </body> | ||
| </html> |
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍🏻
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
감사합니다!!