feat: update environment configuration and enhance API integration
- Remove versioning from docker-compose.yml - Enhance Vite configuration to support API proxying for development - Improve error handling and data normalization in API service - Add fallback values in PublicationsTable and ResearcherCard components - Update sync functionality in DashboardPage to handle backend responses more effectively - Refactor mockSyncResearcher to simulate backend response structure
This commit is contained in:
+16
-6
@@ -1,7 +1,17 @@
|
||||
# Base URL of the FastAPI backend (no trailing slash).
|
||||
# Example for local dev: http://localhost:8000
|
||||
VITE_API_URL=http://localhost:8000
|
||||
# URL base del backend FastAPI (sin barra final).
|
||||
#
|
||||
# Déjalo VACÍO en desarrollo para que las peticiones pasen por el proxy
|
||||
# de Vite (ver vite.config.js). El proxy reenvía /researchers y /health
|
||||
# al destino indicado en VITE_API_PROXY_TARGET.
|
||||
#
|
||||
# En producción apunta directamente al backend, p. ej.
|
||||
# VITE_API_URL=https://api.midominio.com
|
||||
VITE_API_URL=
|
||||
|
||||
# Set to "true" while the backend is not yet implemented.
|
||||
# All API calls will be served by src/services/mocks.js instead of `fetch`.
|
||||
VITE_USE_MOCKS=true
|
||||
# Solo para dev: destino al que el proxy de Vite reenvía las peticiones.
|
||||
# Cambia a http://backend:8000 si ejecutas el frontend dentro de docker-compose.
|
||||
VITE_API_PROXY_TARGET=http://localhost:8000
|
||||
|
||||
# Pon "true" SOLO si el backend no está disponible y quieres trabajar
|
||||
# con los fixtures de src/services/mocks.js. En producción debe estar a "false".
|
||||
VITE_USE_MOCKS=false
|
||||
|
||||
Reference in New Issue
Block a user