import axios from 'axios';

const API = process.env.NEXT_PUBLIC_API_URL;

if (!API) {
  throw new Error('ERROR is not defined');
}

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;
