Correción de Rutas.
All checks were successful
Build and Deploy / remote-build-and-deploy (push) Successful in 13m17s
All checks were successful
Build and Deploy / remote-build-and-deploy (push) Successful in 13m17s
This commit is contained in:
2
Frontend/.env.production
Normal file
2
Frontend/.env.production
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
# Frontend/.env.production
|
||||||
|
VITE_API_BASE_URL=http://192.168.4.128:8081/api
|
||||||
@@ -1,8 +1,8 @@
|
|||||||
import axios from 'axios';
|
import axios from 'axios';
|
||||||
|
|
||||||
// Obtén la URL base de tu API desde variables de entorno o configúrala aquí
|
// Vite reemplazará import.meta.env.VITE_API_BASE_URL con el valor del .env
|
||||||
// Asegúrate que coincida con la URL donde corre tu API ASP.NET Core
|
// durante la compilación. Si no está definida, usará la URL de desarrollo.
|
||||||
const API_BASE_URL = 'http://localhost:5183/api'; // ¡AJUSTA EL PUERTO SI ES DIFERENTE! (Verifica la salida de 'dotnet run')
|
const API_BASE_URL = import.meta.env.VITE_API_BASE_URL || 'http://localhost:5183/api';
|
||||||
|
|
||||||
const apiClient = axios.create({
|
const apiClient = axios.create({
|
||||||
baseURL: API_BASE_URL,
|
baseURL: API_BASE_URL,
|
||||||
|
|||||||
Reference in New Issue
Block a user