Moved from React proxy to config

This commit is contained in:
strNophix 2022-10-04 17:51:07 +02:00
parent 92ee1cfd64
commit 5a7e37077a
3 changed files with 10 additions and 3 deletions

View File

@ -49,6 +49,5 @@
"tailwindcss": "^3.1.8",
"typescript": "^4.6.4",
"vite": "^3.1.0"
},
"proxy": "http://localhost:5000"
}
}
}

View File

@ -0,0 +1 @@
export const API_URL = 'http://localhost:5000';

7
client/src/lib/axios.ts Normal file
View File

@ -0,0 +1,7 @@
import { API_URL } from '@/config';
import Axios from 'axios';
export const axios = Axios.create({
baseURL: API_URL,
withCredentials: true,
});