Online MongoDB Database for Application Testing

If you are planning to develop applications with mongoDB as database and you don’t want to install MongoDB database on your machine, then you can use MongoDB database on cloud for testing your applications.

There is a free quota associated with mongoDB database as service which can be availed for testing you applications locally. Let’s see how you can make MangoDB database on cloud available for connecting your application running on your machine.

Go to MongoDB cloud atlas registration page and enter details for creating account.

After registration, you will land on below page where you can create MongoDB cluster. On that page, you are presented with aws, google and azure as cloud providers options, you can choose any one of them, as all of them has free tier. Then click create cluster.

create mongodb cloud cluster

After clicking create cluster, it takes few minutes to create cluster.

create mongodb cloud cluster

After MongoDB cloud cluster is created, you can click connect on the clusters screen.

mongodb connect to cluster

Then click add your current IP address button to add your IP address to white list. Then create MongoDB user on the same screen by entering user and password and clicking create MongoDB user button. Here is the screen after adding your IP address to white list and creating user.

cloud mongodb connect method

Then, click choose a connection method button to get a screen with connection options.

cloud mongodb connect your app

Then click connect your application option. In the next screen, you can select the driver and version to get a connection string.

cloud mongodb connect your app connection string

For example, if you select java and latest version of driver, here is the connection string. You need to place this connection string, after replacing the password with actual password, in your application configuration and test your app.