Okay, everyone.
So now we got our really simple, basic Reddit Reddit scraper up and running, and now we need to look
into how to actually save the data to our database or MongoDB database specifically.
So the provider that we're going to use to get our MongoDB server hosting, we'll use M-lab.
You could also just host your own MongoDB server on your machine local machine or use another third
party MongoDB hosting.
The nice thing about M-lab is that it's free for smaller databases up to 500MB, which actually can
last you a pretty long time.
But it's fine for a small prototyping and development projects and so it's free to sign up, free to
use.
You can go in there and you can make a database.
So after you made an account, you just go in and create a new database.
So let's see, I already made one here called Reddit Data.
So I will just delete this one and show you guys how we go through creating the database in in lab.
In lab.
So let me just.
Enlarge the text a bit here.
So go ahead and say create new.
Inside of this lab home page and we say create new.
Then, Well, it's up to you if you want to use Google Azure, whatever.
I just use Amazon and Select Sandbox, which is the free one, and then select the region that's closest
to me after I click Continue.
And I select Europe because that's the closest one to me.
And then we give the database a name.
So I'll call it Reddit scraper.
And.
Then we just submit the order which is free.
And.
Now this is up a no, it's not up and running yet.
They're still deploying the database, but it's really fast.
You can see it's up now.
So we go ahead, click on the database.
And.
Then we need to create a user for the database.
So we go into users, say add database user, and we just call it Reddit user.
And password will just create a.
Random secure password.
I'm just using LastPass, but feel free to make up your own password.
Of course.
Just copy that in.
So now we have created a user for the database.
We see the user here.
And that was just my last pass coming up.
And I will just save the password in here.
That's my password.
And there's my user, Reddit user.
And they give a suggestion on a URL you can use to connect, which we are going to be using.
So copy this URL you see up here.
Copy that.
And then we'll just paste it here for later use.
So then we copy the user, put it in where it says user here.
Then we copy the password.
Put it in where it says password.
Pretty straightforward, right?
And now we need to get to the mongoose connecting part.