Balsamoa Backend is configured entirely through environment variables loaded at startup byDocumentation 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. There are only two variables to set — a database connection string and an optional HTTP port — making the configuration surface intentionally minimal. The template file inicializar/.env.example documents all available variables and ships with the repository.
Environment file template
Copy this file to.env at the project root before starting the server for the first time.
inicializar/.env.example
Variable reference
The PostgreSQL connection string used by
pg.Pool to connect to your Supabase database. SSL is enabled automatically with rejectUnauthorized: false so no additional certificate configuration is required.You must use the Supabase transaction pooler URL (port 6543), not the direct connection URL (port 5432). The pooler is compatible with environments that open many short-lived connections, such as development workstations and serverless functions on Vercel.The TCP port that the Express HTTP server binds to when it starts. If this variable is not set or is left empty, the server code defaults to port 3000. The provided
.env.example sets this to 3003 — use that value in development to match the configured default.src/server.mjs
SSL configuration
The database connection pool insrc/config/conexion.bd.mjs enforces SSL for all connections to Supabase with rejectUnauthorized set to false. This allows the Node.js pg driver to connect to Supabase’s hosted PostgreSQL without requiring a client-side CA certificate.
src/config/conexion.bd.mjs
Supabase connection string
Finding the right connection string in the Supabase dashboard takes a few steps. Make sure to select the pooler URL, not the direct URL.- Open your project in the Supabase dashboard.
- Go to Project Settings (gear icon) → Database.
- Scroll down to the Connection string section.
- Select the URI format tab.
- In the Connection mode selector, choose Transaction (this gives you the pooler endpoint).
- Copy the connection string — it will have port 6543 in the URL.
- Replace the
[YOUR-PASSWORD]placeholder with your actual database password.
Development vs production
- Development
- Production
In development, Start the server with:
nodemon watches for file changes and restarts the server automatically. Use a descriptive port to avoid conflicts with other local services and point DATABASE_URL at your Supabase development project or a local PostgreSQL instance..env (development)