parent
00279abafc
commit
8b454eced8
1
.env.development
Normal file
1
.env.development
Normal file
@ -0,0 +1 @@
|
||||
VITE_BASE_URL = "/api"
|
1
.env.production
Normal file
1
.env.production
Normal file
@ -0,0 +1 @@
|
||||
VITE_BASE_URL = "/"
|
@ -2,7 +2,7 @@ import axios, {AxiosError, AxiosRequestConfig} from 'axios'
|
||||
|
||||
export async function request<T = unknown>(config: AxiosRequestConfig<any>): Promise<T> {
|
||||
const instance = axios.create({
|
||||
baseURL: "/api",
|
||||
baseURL: import.meta.env.VITE_BASE_URL,
|
||||
timeout: 5000,
|
||||
headers: {},
|
||||
})
|
||||
|
Loading…
x
Reference in New Issue
Block a user