Skip to content

Commit cabb42d

Browse files
committed
feat(api client): add api client base url as env
1 parent f07f80b commit cabb42d

2 files changed

Lines changed: 2 additions & 1 deletion

File tree

web/src/utils/apiClient.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import axios from "axios";
22

33
export default axios.create({
4-
baseURL: "http://localhost",
4+
baseURL: import.meta.env.VITE_API_CLIENT_BASE_URL,
55
headers: {
66
Accept: "application/json",
77
},

web/src/vite-env.d.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
interface ImportMetaEnv {
44
readonly VITE_PORT?: string; // Add other VITE_ variables as needed
5+
readonly VITE_API_CLIENT_BASE_URL?: string;
56
}
67

78
interface ImportMeta {

0 commit comments

Comments
 (0)