ContabilidadISV uses two separate environment files:Documentation Index
Fetch the complete documentation index at: https://mintlify.com/Medinaallan/ContabilidadISV/llms.txt
Use this file to discover all available pages before exploring further.
backend/.env for the Express.js API server (SQL Server connection, JWT secret, port) and frontend/.env for Vite (API base URL override). Neither file is committed to source control — both are loaded at runtime via dotenv on the backend and Vite’s built-in env system on the frontend.
Backend Environment Variables
These variables are read bybackend/src/models/Database.js and the Express server at startup. All SQL Server variables are optional except JWT_SECRET, which must be set before the server will issue valid tokens.
| Variable | Default | Required | Description |
|---|---|---|---|
DB_SERVER | localhost | No | Hostname or IP of the SQL Server instance |
DB_NAME | ContabilidadISV | No | Name of the target database |
DB_USER | (none) | No | SQL Server login username. Omit to use Windows Authentication |
DB_PASSWORD | (none) | No | Password for DB_USER. Omit when using Windows Authentication |
DB_ENCRYPT | false | No | Set to true when connecting to Azure SQL or any TLS-enforced server |
DB_TRUST_CERT | true | No | Set to false in production to validate the server certificate chain |
DB_INSTANCE | SQLEXPRESS | No | SQL Server named instance. Change to MSSQLSERVER for the default instance |
DB_CONNECTION_TIMEOUT | 30000 | No | Maximum time in milliseconds to wait for a connection to be established |
JWT_SECRET | (none) | Yes | Secret key used to sign and verify JSON Web Tokens. Use a long, random string |
PORT | 3002 | No | HTTP port the Express server listens on |
Frontend Environment Variables
| Variable | Default | Description |
|---|---|---|
VITE_API_URL | /api | Base URL for all API requests. Defaults to /api, which is rewritten by the Vite dev-server proxy to http://localhost:3002/api. Set to the full backend URL (e.g. http://192.168.1.10:3002/api) when the frontend is served independently of the backend |
In the Electron desktop build the API URL is injected via
window.electron.env.API_URL at runtime by the Electron main process, so VITE_API_URL is only relevant for web deployments. See Electron deployment for details.Sample backend/.env File
Copy the block below into backend/.env and fill in your values before starting the server.
Windows Authentication
If your SQL Server is on the same domain as the application server you can omitDB_USER and DB_PASSWORD entirely. When both variables are absent Database.js automatically sets the authentication.type to 'default', which tells the mssql driver to use the current Windows/AD identity:
.env — simply leave those two lines out.