Database Connection Options
Here are the environment variables you can use to configure your database connection:DB_ADAPTER
The adapter handles the MongoDB connection. You can choose between:
default- Uses the official MongoDB package for productionmock- Uses mongo-mock which is perfect for testing
default
DB_URL
The connection URL for your MongoDB database.
Default: mongodb://127.0.0.1:27017/
Example:
DB_MAX_POOL_SIZE
The maximum number of connections in the connection pool. This helps manage database performance under load.
Default: 10
DB_DATABASE
The name of the database to connect to.
Default: (empty string)
Example:
Setting Up Environment Variables
For local development, we recommend using the dotenv package to manage your environment variables:.env file in your project root:
⚠️ Security Note: Never commit secrets or production credentials to version control. Add.envto your.gitignorefile!