diff --git a/client/package.json b/client/package.json index ef950a4..4cc71a6 100644 --- a/client/package.json +++ b/client/package.json @@ -49,6 +49,5 @@ "tailwindcss": "^3.1.8", "typescript": "^4.6.4", "vite": "^3.1.0" - }, - "proxy": "http://localhost:5000" -} + } +} \ No newline at end of file diff --git a/client/src/config/index.ts b/client/src/config/index.ts new file mode 100644 index 0000000..0441f6a --- /dev/null +++ b/client/src/config/index.ts @@ -0,0 +1 @@ +export const API_URL = 'http://localhost:5000'; diff --git a/client/src/lib/axios.ts b/client/src/lib/axios.ts new file mode 100644 index 0000000..a4521ca --- /dev/null +++ b/client/src/lib/axios.ts @@ -0,0 +1,7 @@ +import { API_URL } from '@/config'; +import Axios from 'axios'; + +export const axios = Axios.create({ + baseURL: API_URL, + withCredentials: true, +});