added axios client

This commit is contained in:
Milo Schwartz 2024-10-06 12:39:05 -04:00
parent 3c69acaab7
commit 29777da430
No known key found for this signature in database
7 changed files with 81 additions and 41 deletions

11
src/api/index.ts Normal file
View file

@ -0,0 +1,11 @@
import axios from "axios";
export const api = axios.create({
baseURL: `http://${process.env.NEXT_PUBLIC_SITE_DOMAIN || "localhost:3000"}/api/v1`,
timeout: 10000,
headers: {
"Content-Type": "application/json",
},
});
export default api;