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.
The backend API server must be publicly accessible on the internet before you deploy the frontend. The deployed app will make requests to the URL you set in
VITE_API_URL — if the backend is unreachable, all data operations will fail.Prerequisites
- A Netlify account
- The project repository hosted on GitHub, GitLab, or Bitbucket
- A running, publicly accessible backend API
Deploy steps
Connect your repository
- Log in to Netlify and click Add new site → Import an existing project.
- Choose your Git provider and authorize Netlify to access your repositories.
- Select the
Vacaciones-frontrepository.
Configure build settings
Netlify reads
netlify.toml from the repository root and pre-fills the build settings automatically. Confirm the following values are set:| Setting | Value |
|---|---|
| Build command | npm run build |
| Publish directory | dist |
npm run build runs vite build, which compiles the app into the dist folder.Set environment variables
Before deploying, add your production environment variables so Vite can embed them in the build.
- In the Netlify site settings, go to Site configuration → Environment variables.
- Click Add a variable and add the following:
| Key | Value |
|---|---|
VITE_API_URL | Your production backend URL, e.g. https://api.yourapp.com |
SPA redirect rule
React Router handles navigation on the client side. Without a redirect rule, navigating directly to a URL such as/vacaciones/list returns a 404 from Netlify’s CDN because no file exists at that path.
The netlify.toml in the repository root includes the required redirect rule:
status = 200 (rewrite) means Netlify serves index.html for every route while keeping the original URL in the browser. React Router then renders the correct page. No manual configuration is needed — the file is committed to the repository and Netlify picks it up automatically.
