16 lines
433 B
TypeScript
16 lines
433 B
TypeScript
import axios from "axios";
|
|
|
|
// Use environment variable for API URL, default to localhost:8080 for local development
|
|
const baseURL = process.env.NEXT_PUBLIC_API_URL || "http://localhost:8080/api/";
|
|
|
|
const axiosBaseInstance = axios.create({
|
|
baseURL,
|
|
headers: {
|
|
"content-type": "application/json",
|
|
"X-Client-Key": "b1ce6602-07ad-46c2-85eb-0cd6decfefa3",
|
|
},
|
|
withCredentials: true,
|
|
});
|
|
|
|
export default axiosBaseInstance;
|