2025-04-03 15:37:35 -06:00
|
|
|
import axios from 'axios';
|
|
|
|
|
|
|
|
|
|
const API = process.env.NEXT_PUBLIC_API_URL;
|
|
|
|
|
|
2025-04-04 10:24:58 -06:00
|
|
|
if (!API) {
|
|
|
|
|
throw new Error('ERROR is not defined');
|
|
|
|
|
}
|
|
|
|
|
|
2025-04-03 15:37:35 -06:00
|
|
|
const axiosInstance = axios.create({
|
|
|
|
|
baseURL: API, // Replace with your API base URL
|
|
|
|
|
timeout: 100000, // Request timeout in milliseconds
|
|
|
|
|
headers: {
|
|
|
|
|
'Content-Type': 'application/json',
|
|
|
|
|
},
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
export default axiosInstance;
|