diff --git a/frontend/src/lib/api.js b/frontend/src/lib/api.js index 958d367..e3bed71 100644 --- a/frontend/src/lib/api.js +++ b/frontend/src/lib/api.js @@ -1,7 +1,5 @@ -// src/lib/api.js -// Cliente para el backend FastAPI. Cambia BASE_URL si el backend corre en otra IP. -const BASE_URL = "http://localhost:8000"; - +// ✅ DESPUÉS — Vite inyecta el valor real durante npm run build +const BASE_URL = import.meta.env.VITE_API_URL || "http://localhost:8000"; async function get(path, params = {}) { const qs = new URLSearchParams(params).toString(); const url = `${BASE_URL}${path}${qs ? "?" + qs : ""}`;