In this part, we are going to save the user.
So first we have to create a model and we can just.
Copley's.
And pace here and we changed the name to use user.
And we named these as users skimmer.
And then we change this to email.
Type string required is true and unique is true.
And our case is truth, so we have to set out email to be the lower case and we do not want to have
to send email to just her to use her.
So at last is the password.
And in the night is six.
And we change theirs to user and we named this should be a lowercase user.
So after we divide the structure of the user document.
We are going to get off Congress and we are going to save the USA and sign up process.
So we already got the name, email and password from the request body, so we the structure.
And then we are going to import a model on the top.
So we are going to add a constant user is equal to.
We acquire.
Modules and user.
And now we are going to create the user.
By using the user to create.
And we created with the name email and password, and since we want to return a user instance, so we
create a user.
Cornerstone is eco to use a doctorate, and since this is a.
Pomers, so we have to use the athing, our weight.
And I we her on the surface statement to a one.
With that, Jason, is there the two one means created, otherwise we are going to return to a tad.
If the status is and then understand it has sent a strong ego to fail to create user.
And then here we are going to consult Lord area, and since we already returned something before, also
we do not need this so we can go to the postman again.
And if we have the name email and password and then send to the site request every time turned a user,
we have no idea where she is coming from, the Mongul DB.
And if we go to the Mongo DB and refresh.
And now you can see the user, Peter, already stored inside the Mongo DB.