MultiSas reads its runtime configuration from aDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/fredy-rizo/MultiSas/llms.txt
Use this file to discover all available pages before exploring further.
.env file via the dotenv package, which is loaded at startup inside src/config.js. Only three variables are required to get the server running. The compiled config object is imported by src/app.js and applied to the Express instance before any route handlers are registered.
Required Variables
The TCP port on which the Express HTTP server listens. If omitted,
config.PORT resolves to an empty string and Express falls back to its internal default of 3000. In production, set this explicitly to match your reverse proxy or container port mapping.The full MongoDB connection string used by Mongoose to connect to your database. If omitted,
config.MONGODB_URL resolves to an empty string and the server will fail to establish a database connection at startup. For local development use mongodb://localhost:27017/multisas; for production use a managed service such as MongoDB Atlas.The secret key used by the JWT signing and verification logic. If omitted, the application falls back to the hardcoded default
"contra, token". This default must never be used in production. Use a long, randomly generated string of at least 32 characters.Example .env File
.env
Development Setup
Start the development server with hot-reload usingnodemon:
node src/index.js under nodemon, which watches for file changes and automatically restarts the process. Ensure your .env file exists in the project root before running this command.
Production Recommendations
Follow these guidelines before deploying MultiSas to a production environment:-
Use a strong, random
SECRET.
Generate a value with at least 32 characters using a tool likeopenssl: -
Use a managed MongoDB instance for
MONGODB_URL.
Services such as MongoDB Atlas provide automatic backups, replication, and TLS-encrypted connections. Use a connection string that includes authentication credentials and the?retryWrites=true&w=majorityoptions. -
Set
PORTto match your reverse proxy.
If running behind Nginx or a cloud load balancer, setPORTto the internal port your proxy forwards to (commonly3000or8080). -
Never commit
.envto version control.
The repository’s.gitignorealready excludes.env. Use environment injection from your hosting platform (e.g., Railway, Render, Heroku config vars, or Kubernetes secrets) instead of committing secrets.
In containerised deployments, pass the three variables as container environment variables rather than mounting a
.env file. The dotenv call in config.js is a no-op when the variables are already present in the process environment.