Search⌘ K
AI Features

Connecting to a MongoDB Cluster

Discover how to connect your Deno application to a MongoDB cluster using MongoDB Atlas. Learn to create and configure a cluster, add user authentication, and modify your code to use persistent cloud storage. This lesson helps you transition from an in-memory database to a scalable, real-world database without changing your business logic.

We'll cover the following...

In this lesson, we’ll learn how to connect to a real MongoDB instance. Here, we’ll be using a service called Atlas. Atlas is a service from MongoDB that provides a cloud MongoDB database. Their free tier is quite generous and works well for our application. Create an account there. Once we’ve done that, we can create a MongoDB cluster.

Note: If you have any other MongoDB instance, local or remote, feel free to use it by skipping the next paragraph and going directly to inserting the database URI into ...