How to Easily Connect to DigitalOcean’s Managed MongoDB

via dev.to => original post link

So you’ve just created a new MongoDB database using DigitalOcean’s managed databases and you’re wondering how to connect it to your application. Whether you’re building a new app, adding new features to an existing one, or just want to access your newly created database cluster, it has never been easier to connect to your MongoDB database on DigitalOcean.

Simply copy the connection string provided in the Connection Details section of the dashboard and remember to replace the password field with your password and you’re off to the races.

If you forgot or don’t have your password on hand, you can generate a new one in the Users and Databases tab by clicking on the More Options menu and hitting the Reset Password button. You’ll need to provide your username and then you will be able to reveal the newly generated password.