-
Notifications
You must be signed in to change notification settings - Fork 0
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
Feat/axios #17
Feat/axios #17
Conversation
src/api/instance.ts
Outdated
import axios from 'axios'; | ||
|
||
export const requestApi = axios.create({ | ||
baseURL: 'https://api.mgmg.life/', |
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.
@VictoryJu μλ² api νκ²½λ³μ μ μ©νλ©΄ μ’κ² μ΅λλΉ
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.
gaκ΄λ ¨ ν€κ°λ νκ²½λ³μλ‘κ°κΉμ
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.
@gbwlxhd97 νκ²½λ³μ μ μ©ν΄λλκ² μ’μκ²κ°λ€μ μ견κ°μ¬ν©λλ€!
ν΄λΉλΆλΆ envλ‘ λ³κ²½νμμΌλ, λ°°ν¬νκ²λλ©΄ awsμμ envνκ²½λ³μκ° μ μ©λμ§μμ apiνΈμΆμ΄ μλ κ²κ°μ΅λλ€. serverμͺ½μμ νμΈ νλ² ν λ€μ λ¨Έμ§νλλ‘ νκ² μ΅λλ€. |
κΈ°λ³Έμ μΌλ‘ S3λ μ μ μΉμ¬μ΄νΈλ§ μ§μν΄μ£ΌκΈ° λλ¬Έμ νκ²½λ³μ μ
ν
μ΄ μμ΅λλ€λ§ λ€λ§ νκ²½λ³μκ° λμ΄λλ©΄ λμ΄λ μλ‘ action λ± μμ ν κ» λ§μμ§μΌλ‘ AWS SSM Parameter Storeλ₯Ό μ¬μ©νμλκ²μ κΆμ₯ν©λλ€. λΉλμ νκ²½λ³μλ AWS Access Key, Secret Keyλ§μ μ£Όμ νκ³ μ½λ λ΄λΆμμ Parameter Storeμ νκ²½λ³μλ₯Ό λΆλ¬μ μ¬μ©νλ©΄ κ΄λ¦¬ν¬μΈνΈκ° μ€μ΄λλλ€. mongle-serverμ loadParameterStoreValueλ₯Ό μ°Έκ³ ν΄μ£ΌμΈμ μΆκ°μ μΌλ‘ Parameter Storeλ /λ₯Ό ν΅ν΄ κ³μΈ΅μ ꡬ쑰λ₯Ό λ§λ€ μ μμ΅λλ€. |
κ·ΈλΌ νκ²½λ³μλ₯Ό deploy.yml μλν λ, |
git secretμ΄ action secret λ§μνμλ건κ°μ λ§μ½μ action secretμ΄λ©΄ μ κ° μ΄λ―Έ Organization λ¨μλ‘ secret key μ‘μ λμκ² μμ΅λλ€. |
action secret key νμΈνμ΅λλ€. νλ‘ νΈμμ μ¬μ©λλ keyκ° λΆμ‘±νκ²κ°μ λ°λ‘ μΆκ°ν΄μ ν΄λΉ λ ν¬μ§ν 리μμλ§ μ΄μ©νκ² νλ건 μ΄λ¨κΉμ? |
μΆκ°λ‘ κΆκΈνκ²μ΄μλλ°μ, νμ¬ github actionμ μν΄ ci.yml νμΌκ³Ό deploy.ymlνμΌμ΄ μμ΅λλ€. ci.ymlνμΌμμ λΉλλ₯Ό μ§ννκ³ - name: Install Dependencies
run: npm install
- name: Build
run: npm run build ci.yml νμΌμ΄ λ¨Όμ μ€νλκ³ λΉλ νμΌμ΄ λ§λ€μ΄μ§λκ²κ°μλ°, λλ² λΉλνλ©΄ λ°°ν¬ν λ μκ°μ΄ λ 걸릴κ²κ°μμ νλ²λ§ λΉλνλ©΄ λ°°ν¬μκ°μ μ€μΌμμμ§μμκΉ μΆμ΅λλ€. |
|
μλ‘ λ€λ₯Έ μ΄λ²€νΈλΌλ©΄ λμΌνκ² λ£μ΄μ£Όμ΄μΌλκ² κ΅°μ μ΄ν΄νμ΅λλ€ κ°μ¬ν©λλ€! secret key μΆκ°ν΄μ github action μμ λΉλν λ μΆκ°νλλ‘ νμμ΅λλ€. |
π« [μ§λΌ ν°μΌ λ²νΈ]
π οΈ μμ λ΄μ©
κΈ°μ‘΄ μ¬μ©νλ fetchλμ axiosλ‘ λ³κ²½νμμ΅λλ€.
π± μμ νλ©΄
ποΈ Note (optional)