๐ ํ๋ก์ ํธ ๊ฐ์
๋์ ๊ด์ฌ์ฌ๋ฅผ ๊ฐ๋ ๋ด์ ๋์ ์ผ์น์ ์ถ์ ์ด๋ฃจ๊ธฐ ์ํด T1 ์ ์๋ค์ ์๋ญ ์ ์ ์ ํ๋ฒ์ ํ์ธํ ์ ์๊ณ , T1์ ๊ณต์ ์ ํ๋ธ๋ฅผ ๋ฐ๋ก ํ์ธํ ์ ์๋ ์ฌ์ดํธ๋ฅผ ๋ง๋ค๊ธฐ๋ก ํ๋ค.

์ฒ์ ๋ค์ด๊ฐ๋ฉด T1์ ๊ณต์ ์ ํ๋ธ ์์์ด ๋์ด๋๊ณ ์ํ๋ ์์์ ๊ฒ์ํ ์ ์๋ค. ๋๋ฒ์งธ ํ์ด์ง์๋ T1์ ์์๋ ์ ์๋ค์ ์ ๋ณด๋ฅผ ์๋ ค์ค ๊ฒ์ด๊ณ , ์ ์ ํ๋กํ์ ๋๋ฅด๋ฉด ํด๋น ์ ์์ ์๋ญ ์ ์ ์ ๋ณด๋ฅผ ๋ฐ๋ก ํ์ธํ ์ ์๋๋ก ํ ์์ ์ด๋ค.
๐ค ๊ธฐ์ ์คํ
์ด๋ฒ ํ๋ก์ ํธ์์ ์ด์ฉํ ๊ธฐ์ ์คํ์ ๋ค์๊ณผ ๊ฐ๋ค
- React, Redux Toolkit
- Typescript
- eslint, prettier
๐ฉ๐ปโ๐ป API key ๋ฐ๊ธ ๋ฐ CORS Error ํด๊ฒฐ
T1 ๊ณต์ ์ ํ๋ธ ์ฑ๋์์ ์์์ ๊ฐ์ ธ์ค๊ธฐ ์ํด์ Youtube API๋ฅผ ์ด์ฉํ ๊ฒ์ด๊ณ ์ ์๋ค์ ์ ์ ์ ๋ํ๋ด์ฃผ๊ธฐ ์ํด์ Riot API ์ญ์ ์ด์ฉํ ์์ ์ด๋ค. API ํค ๋ฐ๊ธ์ ์ฝ๊ฒ ๋ฐ๊ธ์ด ๊ฐ๋ฅํ๊ธฐ์ 5๋ถ ์์ ํด๋ฆฌ์ดํ๋ค.
https://console.cloud.google.com/projectselector2/apis/dashboard?supportedpurview=project
Google ํด๋ผ์ฐ๋ ํ๋ซํผ
๋ก๊ทธ์ธ Google ํด๋ผ์ฐ๋ ํ๋ซํผ์ผ๋ก ์ด๋
accounts.google.com
https://developer.riotgames.com/
Riot Developer Portal
About the Riot Games API With this site we hope to provide the League of Legends developer community with access to game data in a secure and reliable way. This is just part of our ongoing effort to respond to players' and developers' requests for data and
developer.riotgames.com
์ฌ๊ธฐ์์ youtube API๋ฅผ ์ด์ฉํ๊ธฐ ์ํ key์ Riot API๋ฅผ ์ด์ฉํ๊ธฐ ์ํ key๋ฅผ ๋ฐ๊ธ๋ฐ์ ์ ์๋ค. Riot Developer์ ๊ฒฝ์ฐ ์น์ธ ๋ฐ์ง ์์ key๋ ์ ํจ ์๊ฐ์ด 24์๊ฐ ๋ฐ์ ์๋๊ณ tournament ์ ๋ณด์ ์ ๊ทผํ ์ ์๋ค. ๋ฐ๋ผ์ ๋ผ์ด์์๊ฒ ์์ด๋ก ๋ด๊ฐ ๋ง๋ค๊ณ ์ ํ๋ ์ฌ์ดํธ ์ ๋ณด๋ฅผ ์ ์ฑ์ค๋ฝ๊ฒ ์จ์ ์น์ธํด๋ฌ๋ผ๋ ๋ฉ์ธ์ง๋ฅผ ๋ณด๋ด์ผํ๋๋ฐ, ์ด๊ฒ ๋๋ฌ ๊ฐ๊น์ด ๊ฑธ๋ฆฐ๋ค๋ ํ๊ธฐ๋ฅผ ์ฝ๊ณ ๋์ ๋ ๊ทธ๋ฅ ํ๋ฃจ์ ํ๋ฒ์ฉ key๋ฅผ ๊ฐฑ์ ํ๋ฉด์ ํ๋ก์ ํธ๋ฅผ ์งํํ๋ค. ์ด์ฐจํผ tournament ์ ๋ณด๋ ๋์๊ฒ ํ์๊ฐ ์๊ธฐ๋ ํ๊ณ .

Riot API์ ๊ฒฝ์ฐ, client์์ ์ง์ header๋ฅผ ๋ฃ์ด์ ๋ณด๋ด๋ฉด cors error๊ฐ ๋ฌ๋ค. ๊ทธ๋์ server ์ชฝ์์ api๋ฅผ ์ด์ผํ๋๋ฐ, ์ด๋ฒ์ ๋๋ ํผ์์ ํ๋ก์ ํธ๋ฅผ ์งํํ๊ธฐ ๋๋ฌธ์ nodejs๊น์ง ์ปค๋ฒํ๊ธฐ์ ํ๊ณ๊ฐ ์์ด์ google extenstion์ผ๋ก ํด๊ฒฐํด์คฌ๋ค. Moesif Origin $ CORS Changer๋ฅผ ๊ฒ์ํด์ ๋ค์ด๋ฐ๊ณ ํ์ฑํ์์ผ์ฃผ๋ฉด CORS ์๋ฌ๋ฅผ ํด๊ฒฐํ ์ ์๋ค!
์ด๋ ๊ฒ ์ฌ์ ์์ ์ ๋๋ด๊ณ , ์ด์ ์ง์ง ๊ฐ๋ฐ์ ์์ํด๋ณด๋๋ก ํ๊ฒ ๋ค.