16 lines
474 B
TypeScript
16 lines
474 B
TypeScript
import axios from "axios";
|
|
|
|
// Mengambil base URL dari environment variable, default ke API production
|
|
const baseURL = process.env.NEXT_PUBLIC_API_BASE_URL || "https://jaecookelapagading.com/api";
|
|
const clientKey = process.env.NEXT_PUBLIC_CLIENT_KEY || "bb65b1ad-e954-4a1a-b4d0-74df5bb0b640";
|
|
|
|
const axiosBaseInstance = axios.create({
|
|
baseURL,
|
|
headers: {
|
|
"Content-Type": "application/json",
|
|
"X-Client-Key": clientKey,
|
|
},
|
|
});
|
|
|
|
export default axiosBaseInstance;
|