use config file instead of env

This commit is contained in:
Milo Schwartz 2024-10-12 18:21:31 -04:00
parent 6fb569e2cd
commit d9ae322e2a
No known key found for this signature in database
19 changed files with 189 additions and 209 deletions

View file

@ -1,10 +1,7 @@
import axios from "axios";
// const baseURL = `${window.location.protocol}//${window.location.host}/api/v1`;
export const api = axios.create({
baseURL: "http://testing123.io:8081/api/v1",
baseURL: process.env.NEXT_PUBLIC_EXTERNAL_API_BASE_URL,
timeout: 10000,
headers: {
"Content-Type": "application/json",
@ -12,7 +9,7 @@ export const api = axios.create({
});
export const internal = axios.create({
baseURL: "http://pangolin:3000/api/v1",
baseURL: process.env.NEXT_PUBLIC_INTERNAL_API_BASE_URL,
timeout: 10000,
headers: {
"Content-Type": "application/json",