MongoDB Atlas Setup
Use MongoDB Atlas for production to ensure replica set support and reliable transaction handling.
Create a cluster at https://www.mongodb.com/atlas
Create a database user with read/write permissions
Add your production IPs to the Network Access list
Copy the connection string from the driver configuration
Set
MONGODB_URIand (optionally)MONGODB_DATABASEin your environment
Example connection string:
mongodb+srv://<username>:<password>@<cluster>.mongodb.net/earthquake_catalogue?retryWrites=true&w=majority
Ensure your deployment has the same database name configured as the application.