1
00:00:00,360 --> 00:00:07,920
At this moment, you can see we send the password directly to our database, and this is not very good

2
00:00:07,920 --> 00:00:11,030
because everybody can see the password.

3
00:00:11,430 --> 00:00:17,840
So we will go to a store, the password we're hashing before this point with Mongo DB.

4
00:00:18,330 --> 00:00:21,820
So we need to use the mongoose hook.

5
00:00:23,430 --> 00:00:31,140
The mongoose is a special function which fire a certain mongoose, Iran's a mongoose who is a special

6
00:00:31,140 --> 00:00:32,820
function which will fire.

7
00:00:34,530 --> 00:00:42,720
After or before a certain mongoose, events such as whether is safe, we move, update one, unit one

8
00:00:43,500 --> 00:00:44,220
or unit.

9
00:00:44,790 --> 00:00:51,750
So back to our project if you want to do it before we save or create a user.

10
00:00:52,810 --> 00:00:55,420
We can go to the USS Kimmo and.

11
00:00:56,930 --> 00:00:58,820
For example, if we want to.

12
00:00:59,740 --> 00:01:06,280
Do something before we save the USA, we can type USA schema.

13
00:01:10,080 --> 00:01:12,150
And then before we saved a yuzu.

14
00:01:16,450 --> 00:01:17,650
We can pass the next.

15
00:01:20,050 --> 00:01:29,750
And there's just like express video where you have to make a mix in order to not to stuck inside dysfunction.

16
00:01:29,890 --> 00:01:35,290
And we want to continue this function after we do something in between.

17
00:01:36,500 --> 00:01:41,780
So, yeah, we can also download and be both a.

18
00:01:45,630 --> 00:01:48,420
And then we passed these these referred to.

19
00:01:50,190 --> 00:01:52,200
The user that we just created.

20
00:01:53,220 --> 00:01:54,750
So now we start this over.

21
00:02:00,340 --> 00:02:10,450
And if we Nemitz, Peterffy, and because here now we just passed one Yuuta with PETA, so we use Peterffy

22
00:02:10,450 --> 00:02:11,500
and try to send.

23
00:02:14,210 --> 00:02:22,040
At the console, you kind of see it has the instance of the user and which is.

24
00:02:23,130 --> 00:02:31,650
The local instance, and we can also do it after we save the user so we can use polls.

25
00:02:32,160 --> 00:02:39,540
This is after her save and we can also post a document that we just save.

26
00:02:45,110 --> 00:02:48,170
So we tried and other uses such as Peter Tattoo.

27
00:02:50,420 --> 00:02:51,470
And then click save.

28
00:02:52,980 --> 00:03:01,020
Now, you can see there are two kinds of a lot of these people save and the other is after save, and

29
00:03:01,020 --> 00:03:05,070
these properties just can happen after saving to the Mongo DB.
