Moved from React proxy to config
This commit is contained in:
parent
92ee1cfd64
commit
5a7e37077a
@ -49,6 +49,5 @@
|
||||
"tailwindcss": "^3.1.8",
|
||||
"typescript": "^4.6.4",
|
||||
"vite": "^3.1.0"
|
||||
},
|
||||
"proxy": "http://localhost:5000"
|
||||
}
|
||||
}
|
||||
}
|
1
client/src/config/index.ts
Normal file
1
client/src/config/index.ts
Normal file
@ -0,0 +1 @@
|
||||
export const API_URL = 'http://localhost:5000';
|
7
client/src/lib/axios.ts
Normal file
7
client/src/lib/axios.ts
Normal file
@ -0,0 +1,7 @@
|
||||
import { API_URL } from '@/config';
|
||||
import Axios from 'axios';
|
||||
|
||||
export const axios = Axios.create({
|
||||
baseURL: API_URL,
|
||||
withCredentials: true,
|
||||
});
|
Loading…
x
Reference in New Issue
Block a user