We've now got a very simple express application put together.
So now we're gonna start to set up Mongo DB inside of our project.
Let's first get a quick reminder on what Mongo DB is and why we're using it.
Okay.
So we're going to use an outside server or an outside database called Mongo DB.
This server is going to store all of our user data and location data so user data is essentially all
the different accounts that a user might create.
So user data would be like an email and a password tied to that email.
We're also gonna store all of our different location data here as well.
So a given user can have many different tracks and remember a track is essentially a collection of points
that we eventually want to render on a map.
So our Mongo DV instance is also going to store all that location data as well in order to work with
Mongo DV from our Express API.
We're going to use a library called Mongoose which we actually just installed in the last video or two.
It's now that we've created our library where we've got Mongoose already installed.
The only other thing we have to do is setup Mongo DV either on our local machine or using some outside
service.
So in this course we're going to use a free hosted copy of Mongo DB.
We're using a free hosted copy because it's very easy to setup and also has a very nice UI that we can
use to inspect all the data that could say to our database so in order to set up a free hosted instance
of Mongo DV I'm going to navigate to the lengthy see right here inside of a new browser tab
once you get to this page you're going to be prompted to log in if you have already created a mongo
DB account in the past.
Then go ahead and sign in with it otherwise click on register right there to sign up for a new account.
I already have a mongo DB account so I'm going to sign in right now.
All right once were signed in for the first time.
We're going to be taken to a dashboard page of sorts.
So it might look a little bit like this.
You also if you're signing up for an account for the very first time you might see a kind of welcome
screen or something like that.
Essentially what we want to do right now is build a cluster or create a new database so whatever flow
you get entered into.
Well essentially we're just trying to find that green button that says build a cluster.
If you don't see that button right away try to find the clusters link over here on the left hand side.
It's going to click on build a cluster and then we're going to be prompted with a little setup was there
right here.
Now when we create a cluster Mongo DB can create a mongo instance on any of three different cloud providers
for us.
So either NWS GOOG cloud platform or Windows ASR.
It really does not matter what provider you use.
Just pick one at random.
There's really no difference whatsoever for what we're doing here.
Once you select a provider you can then click on the different locations here.
Just make sure that you select a free tier available option.
In general you want to find the location closest to your physical location the world but do make sure
that you select one that has a free tier available so I'm gonna go with North Virginia right here for
myself because there is a free tier available I should see free appear on the bottom left hand side
and then on the bottom right click on Create cluster now creating the cluster says right here that takes
between seven and 10 minutes.
I found that actually takes just like two or three so we'll take a quick pause right here.
We'll wait for the cluster to be created and when we come back in the next video we're gonna do just
a little bit further configuration of our cluster.
Inside this UI and then make sure that our server can connect to it so quick possible.
Wrap up this Mongo DB stuff in the next video.