feat: load API base URL from env
This commit is contained in:
parent
2166685131
commit
0d52ef187a
5
.env.example
Normal file
5
.env.example
Normal file
@ -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
|
||||
|
||||
@ -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,
|
||||
})
|
||||
|
||||
// 요청 시 토큰 자동 추가
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user