All right.
And once her front end is in place now, let's secure our server.
And what's really cool with the help of community?
So think npm packages?
It's really pretty straightforward.
We'll just need to install a few libraries and set it up on our server.
In this project, we will install Helmick to secure our headers x ss clean to sanitize user input and
as a result, prevent cross-site scripting attacks, express Mongo sanitize to prevent MongoDB operator
injection and express a right limit to limit the amount of requests by one IP address.
Now I did provide the links to the libraries, so if you want to learn more about the packages, just
utilize them.
But like I just said, it's pretty straightforward.
First, we just want to install all of them and then we want to set them up as middleware.
So I pushed right away in the read me the entire command where we just go with npm install and then
all of the packages for all utilize that.
Copy and paste.
I'll install them now while the packages are being installed.
I also want to remove the log in the error handler, so we're setting that one up while we were developing.
And I think now it's a great time to remove it.
So let's navigate your middleware, more specifically our handler.
Unless you just remove this console, log for the error, and then let's start in this video by setting
up these packages.
So I want to get home at.
Excess clean and Mango senators.
And then right after CreditJason, let's invoke them as middle so ago goes up years and then provide
the package and invoke it.
And in the next video, we'll worry about the question because although a bit of a different setup.
So first, let's navigate a server, I guess, right off their path.
But kind of makes more sense to me.
Want to go with helmet I was coming from and I'm looking for a library.
And the same is going to be with access screen.
So in this case, they're going to go with exercise and let's look for the package.
And then lastly, we want to do the same thing with Mongo senators.
So important ban.
Let's come up with the name.
I guess in my case, I'm going to go with Mongo sanitizer and that is coming from the Express Mongo
Sanitize package.
Let's save it.
And let me just make sure so sanitize over here.
Of course, there was spelling is not my best friend.
So let's keep on moving.
And like I said, right off, throw expression or something.
I was just going about use.
Let's start with the helmet.
Invoke it.
Copy and paste can simply change these variables around.
So this is going to be access and the next one will be the mom or sanitizer.
So that sets up these three packages again.
How much is there secured headers?
Access as clean is to make sure that we sanitize the input so we prevent the cross-site scripting attacks.
And when it comes to Mongo sanitize, essentially it prevents the MongoDB operator injection.