The app uses Vite’s built-in environment variable system. Variables are read at build time and embedded in the client bundle.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/CKoldo/Vacaciones-front/llms.txt
Use this file to discover all available pages before exploring further.
Available variables
| Variable | Required | Default | Description |
|---|---|---|---|
VITE_API_URL | In production | http://localhost:5175 | Base URL of the backend API server. Trailing slashes are stripped automatically. |
VITE_API_URL
VITE_API_URL sets the base URL that the frontend uses when making API requests. It is read in src/app/api.ts:
http://localhost:5175.
Local development
During local development you do not need to setVITE_API_URL. Vite’s dev server proxies all requests that start with /api to http://localhost:5175, so the frontend and backend communicate through the proxy without cross-origin issues.
This proxy is configured in vite.config.ts:
The Vite dev server runs on port 5173 and the backend is expected on port 5175.
Production
In production there is no Vite dev server, so the proxy is not available. You must setVITE_API_URL to the public URL of your deployed backend before building.
Setting variables in a .env file
Create a.env file in the project root for local overrides. Vite loads this file automatically.
| File | When it is loaded |
|---|---|
.env | Always |
.env.local | Always, ignored by git |
.env.production | Only when running vite build |
.env.development | Only when running vite (dev server) |
