1
00:00:00,310 --> 00:00:03,060
As far as the setup, we should already know the drill.

2
00:00:03,710 --> 00:00:09,920
We're looking for the main folder, then we're looking for zero seven file upload.

3
00:00:10,410 --> 00:00:12,460
We have two directories in there.

4
00:00:12,480 --> 00:00:17,610
We have the final one with complete code and start where we'll do all of our work.

5
00:00:17,940 --> 00:00:20,730
So first, let's navigate through the star.

6
00:00:21,180 --> 00:00:26,220
And I think at this point it's going to be the fastest if we just grab the star.

7
00:00:26,430 --> 00:00:27,300
As a side note.

8
00:00:27,330 --> 00:00:34,200
There was a quick update on the visual studio code where it didn't work, where basically you could

9
00:00:34,440 --> 00:00:39,870
try to get the folder, but it wasn't copying and pasting in the entire terminal.

10
00:00:40,050 --> 00:00:45,000
And then with the latest update, I believe the August one, everything works again.

11
00:00:45,720 --> 00:00:50,390
So now I can go with CD, grab my star, navigate there.

12
00:00:50,400 --> 00:00:53,610
First, we want to install all the dependencies.

13
00:00:53,880 --> 00:01:00,480
And as far as the setup, we've got some controllers in here and we'll set up to controllers the product

14
00:01:00,480 --> 00:01:02,490
one as well as the uploads one.

15
00:01:02,490 --> 00:01:05,790
And you'll see why we have two of them, Vehbi.

16
00:01:06,030 --> 00:01:09,910
This is for connecting with the database that we've got the errors.

17
00:01:09,930 --> 00:01:12,750
This is where will display all the errors, images.

18
00:01:13,000 --> 00:01:18,180
These are just images that you can use for the project, but you don't have to you can use your own

19
00:01:18,180 --> 00:01:19,050
images as well.

20
00:01:19,410 --> 00:01:22,980
Middleware for authentication, error and not found.

21
00:01:23,220 --> 00:01:25,650
Now, we're not going to use the authentication one.

22
00:01:25,870 --> 00:01:28,890
This is just there because we can take it from project to project.

23
00:01:29,190 --> 00:01:37,320
The arrow one and not one is the one that we'll use that models will have eventually a product model,

24
00:01:37,470 --> 00:01:41,430
since I want to keep it as close to a real world as possible.

25
00:01:41,970 --> 00:01:43,590
Also, we've got a public on.

26
00:01:43,590 --> 00:01:50,280
So this is eventually where I'll show you how the real world setup is going to look like when you have

27
00:01:50,280 --> 00:01:52,530
the actual front end as well.

28
00:01:53,670 --> 00:01:57,510
Will only have the product without which at the moment is just empty.

29
00:01:57,810 --> 00:02:04,800
Now, you're also probably noticing the filenames where as your project gets bigger and bigger, it

30
00:02:04,800 --> 00:02:11,100
makes a little bit more sense to have these long names where I have the roots and instead of just product

31
00:02:11,100 --> 00:02:18,420
or product, I go with product routes or product control or uploads controller, because that way,

32
00:02:18,450 --> 00:02:23,280
once you navigate to the file, you can actually see in the tab the filename.

33
00:02:23,280 --> 00:02:25,470
So I know where it is actually located.

34
00:02:25,800 --> 00:02:31,320
Otherwise, if you have a bunch of products here, it's kind of hard to determine whether the product

35
00:02:31,530 --> 00:02:34,170
references the controllers or order out.

36
00:02:34,350 --> 00:02:35,850
So that's just a small side.

37
00:02:36,270 --> 00:02:43,440
And then back in the abcess, you notice that we are required, not envy the express async errors.

38
00:02:43,680 --> 00:02:45,290
Then we invoke express.

39
00:02:45,570 --> 00:02:52,020
We are connecting to a database as well as to be not found one and our handler.

40
00:02:52,350 --> 00:02:58,170
I have the home route where I just display adding one file upload and I invoke both.

41
00:02:58,170 --> 00:03:06,090
Middleware may not find one an error and the one I also set up the port using the data entry port or

42
00:03:06,270 --> 00:03:08,340
three thousand in here.

43
00:03:08,340 --> 00:03:11,790
I'm looking for a process that N.V. Mongul Urai.

44
00:03:12,150 --> 00:03:17,610
So before we do anything, once we have installed all the packages, we also want to create a new file

45
00:03:18,390 --> 00:03:20,070
and we're going to go with dot entry.

46
00:03:20,490 --> 00:03:25,650
And this is the case where you can get the value from the previous project.

47
00:03:25,860 --> 00:03:29,760
Since we're connecting to the database pretty much in every project.

48
00:03:29,980 --> 00:03:36,840
If you don't want to go to a Mongo DB site, you can simply go back to one of the previous project,

49
00:03:37,140 --> 00:03:40,820
look for DOT N.V. and then just get value.

50
00:03:41,240 --> 00:03:43,320
In my case, I'll start everything from scratch.

51
00:03:43,590 --> 00:03:45,900
So I'm back in Mongo DB.

52
00:03:46,140 --> 00:03:48,330
I'm looking for Connect option.

53
00:03:48,720 --> 00:03:57,000
I'm going to go for Connect Your Application one, then I'll grab the string and as far as database.

54
00:03:58,250 --> 00:04:05,780
I'll call this one zero seven file upload, so it may remove the name over here and let's just go with

55
00:04:05,780 --> 00:04:08,600
zero seven and that while.

56
00:04:09,770 --> 00:04:16,220
Unplowed, then I just need to provide the correct password here, and once the data entry file is in

57
00:04:16,220 --> 00:04:24,710
place with the correct Mongul URAI value, then we can go to a terminal on the right and RPM's start,

58
00:04:24,950 --> 00:04:28,400
which in turn will spin up a node.

59
00:04:28,700 --> 00:04:35,330
And if you can see in a console server is listening on Port three thousand, then we have a success

60
00:04:35,540 --> 00:04:39,290
and we can start working on the application if you want to double check.

61
00:04:39,560 --> 00:04:46,310
You can go to localhost three thousand and you should see file upload starrer on a screen.

