diff --git a/.env.example b/.env.example new file mode 100644 index 0000000..90bf525 --- /dev/null +++ b/.env.example @@ -0,0 +1,5 @@ +# Rename this file to .env and set the API base URL for your environment +# Example: +# VITE_API_BASE_URL=http://localhost:8000 +VITE_API_BASE_URL=https://api.example.com + diff --git a/src/lib/api.ts b/src/lib/api.ts index 9c788fe..2271829 100644 --- a/src/lib/api.ts +++ b/src/lib/api.ts @@ -1,8 +1,7 @@ import axios from 'axios' const api = axios.create({ - baseURL: 'https://api.biryu2000.kr', - // baseURL: 'http://localhost:8000', + baseURL: import.meta.env.VITE_API_BASE_URL, }) // 요청 시 토큰 자동 추가