At this moment, you can see we send the password directly to our database, and this is not very good
because everybody can see the password.
So we will go to a store, the password we're hashing before this point with Mongo DB.
So we need to use the mongoose hook.
The mongoose is a special function which fire a certain mongoose, Iran's a mongoose who is a special
function which will fire.
After or before a certain mongoose, events such as whether is safe, we move, update one, unit one
or unit.
So back to our project if you want to do it before we save or create a user.
We can go to the USS Kimmo and.
For example, if we want to.
Do something before we save the USA, we can type USA schema.
And then before we saved a yuzu.
We can pass the next.
And there's just like express video where you have to make a mix in order to not to stuck inside dysfunction.
And we want to continue this function after we do something in between.
So, yeah, we can also download and be both a.
And then we passed these these referred to.
The user that we just created.
So now we start this over.
And if we Nemitz, Peterffy, and because here now we just passed one Yuuta with PETA, so we use Peterffy
and try to send.
At the console, you kind of see it has the instance of the user and which is.
The local instance, and we can also do it after we save the user so we can use polls.
This is after her save and we can also post a document that we just save.
So we tried and other uses such as Peter Tattoo.
And then click save.
Now, you can see there are two kinds of a lot of these people save and the other is after save, and
these properties just can happen after saving to the Mongo DB.