Balsamoa Backend reads its runtime configuration from environment variables loaded by theDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/MateoNavarroMN/Balsamoa-Backend/llms.txt
Use this file to discover all available pages before exploring further.
dotenv package. In local development these variables are defined in a .env file at the project root; on Vercel they are set directly in the project dashboard. This page documents every variable the application recognises, the correct format for each value, and where to find the information you need from Supabase.
.env.example
The repository ships with an.env.example file inside the inicializar/ folder. Copy it to the project root and fill in your values before starting the server for the first time:
Variable reference
Full PostgreSQL connection string used by the Example:
pg Pool in src/config/conexion.bd.mjs to connect to the database.For Supabase, you must use the connection pooler URI with port 6543 (not the direct connection on port 5432). Append ?pgbouncer=true to the query string to enable PgBouncer compatibility mode.Format:HTTP port that the Express server listens on when running locally. Defined in This variable is not needed on Vercel. Vercel assigns and manages the port for serverless functions automatically. Setting it in the Vercel environment variable panel has no effect.Set it to any free port on your machine during local development — the
src/server.mjs as:.env.example uses 3003 as a sensible default to avoid conflicts with other common development servers.SSL configuration
Supabase hosts PostgreSQL in the cloud and requires all connections to be encrypted with TLS. Thepg Pool in src/config/conexion.bd.mjs always enables SSL with the following configuration:
rejectUnauthorized: false tells the Node.js TLS stack to accept Supabase’s certificate without verifying it against a local CA bundle. This is the correct and expected setting for Supabase’s managed PostgreSQL — the certificate is valid, but Node.js would otherwise reject it because it cannot resolve the certificate authority in some environments. You do not need to configure any additional SSL variables.
Where to find your Supabase DATABASE_URL
- Open your project in the Supabase dashboard.
- Go to Project Settings (the gear icon in the left sidebar).
- Click the Database tab.
- Scroll down to the Connection string section and select the URI tab.
- Copy the displayed URI.
- Change the port from
5432to6543in the copied string. - Add
?pgbouncer=trueat the end of the URI if it is not already present.
DATABASE_URL in your .env file (locally) or in the Vercel environment variable panel (production).