Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/15aozzz/Lab-Nova-Salud/llms.txt

Use this file to discover all available pages before exploring further.

Botica Nova Salud uses two environment files — one for the Node.js backend and one for the React frontend. Neither file is committed to the repository; you create them locally by copying the provided examples and filling in values specific to your setup.

Backend — backend/.env

The backend reads its configuration at startup via dotenv. All seven variables below are required; the server will not connect to MySQL or issue tokens if any are missing or incorrect.
DB_HOST
string
default:"localhost"
required
Hostname or IP address of your MySQL server. Use localhost for a local installation, or the remote host address for a hosted database.
DB_PORT
number
default:"3306"
required
TCP port MySQL listens on. The default MySQL port is 3306. Change this only if your MySQL instance is configured to use a different port.
DB_USER
string
default:"root"
required
MySQL username the backend connects with. This user must have execute permissions on the stored procedures in BoticaNovaSalud_Final.
DB_PASSWORD
string
required
Password for the MySQL user. Leave empty only if your local MySQL installation has no password set for the user (not recommended for any shared or production environment).
DB_NAME
string
default:"BoticaNovaSalud_Final"
required
Name of the MySQL database to connect to. This must match the database created when you imported boticanovasalud_final.sql. Do not change this unless you renamed the database during import.
PORT
number
default:"3000"
required
Port the Express server listens on. The frontend is pre-configured to call http://localhost:3000/api, so if you change this value you must also update VITE_API_URL in fn/.env.
JWT_SECRET
string
required
Secret key used to sign and verify JSON Web Tokens. Tokens expire after 8 hours. Use a long, random string — at minimum 32 characters. Any user with this value can forge valid session tokens.
Never use the placeholder value nova_salud_secret_key_2024 from the example file in any environment other than your local development machine. Generate a unique secret before deploying.

Example

backend/.env
DB_HOST=localhost
DB_PORT=3306
DB_USER=root
DB_PASSWORD=your_mysql_password
DB_NAME=BoticaNovaSalud_Final
PORT=3000
JWT_SECRET=replace_with_a_long_random_secret

Frontend — fn/.env

The React frontend is built with Vite. Vite only exposes variables prefixed with VITE_ to the browser bundle.
VITE_API_URL
string
default:"http://localhost:3000/api"
required
Base URL of the backend REST API. All Axios requests in the frontend are prefixed with this value. If you change the backend PORT or deploy the backend to a remote host, update this variable to match.
When deploying the frontend to a production host, set VITE_API_URL to your backend’s public HTTPS URL (for example, https://api.yourdomain.com/api). Rebuild the frontend after changing this value — Vite bakes it into the bundle at build time, not at runtime.

Example

fn/.env
VITE_API_URL=http://localhost:3000/api

Build docs developers (and LLMs) love