1
00:00:07,840 --> 00:00:09,070
Welcome back.

2
00:00:09,100 --> 00:00:14,620
In this video, let's see how we can install MongoDB.

3
00:00:14,770 --> 00:00:20,800
So go to MongoDB dot com and integrate you with this beautiful website.

4
00:00:21,340 --> 00:00:27,250
So I will show you the path all the way to install MongoDB locally if you want.

5
00:00:27,250 --> 00:00:30,310
But I will not finish up the process.

6
00:00:30,310 --> 00:00:36,850
I will show you where you can find the documentation and I'll also show you where we can use the drivers

7
00:00:36,850 --> 00:00:38,200
for installation.

8
00:00:38,200 --> 00:00:45,670
So click on product and then after clicking on that here you will see under tools we have what is called

9
00:00:45,670 --> 00:00:52,450
Shell and we can use MongoDB also inside Visual Studio code and I'll show you this one also.

10
00:00:52,540 --> 00:01:00,430
So click on Shell and you can see that MongoDB Shell best in class database share experience.

11
00:01:00,430 --> 00:01:06,100
If you scroll down, you can see how you can interact with MongoDB with the shell.

12
00:01:06,100 --> 00:01:10,840
And we have a couple of steps to show you how it works over here.

13
00:01:11,020 --> 00:01:15,880
So let's scroll up and then click on the download.

14
00:01:15,880 --> 00:01:22,450
Now if you click on that, we see that it's asking us to download MongoDB Shell.

15
00:01:22,540 --> 00:01:27,310
So select your platform to use and then click on download.

16
00:01:27,310 --> 00:01:35,680
So like I said, for the Mac users, the steps is all that difficult as compared to Windows users.

17
00:01:35,680 --> 00:01:40,900
But we are not going to use the shell, but instead we are going to use the drivers.

18
00:01:40,900 --> 00:01:46,360
So click on resources here and the next step is under documentation.

19
00:01:46,360 --> 00:01:48,760
Click on develop applications.

20
00:01:48,760 --> 00:01:53,080
So click on that and let's see the options we have.

21
00:01:53,350 --> 00:01:59,170
And under that you can see that we have what is called develop applications and we have a couple of

22
00:01:59,170 --> 00:02:01,960
ways where we can use MongoDB.

23
00:02:02,200 --> 00:02:06,130
The first one is the drivers and we can use MongoDB.

24
00:02:06,130 --> 00:02:10,030
Also inside Visual Studio code, I will show you this tool.

25
00:02:10,060 --> 00:02:12,280
So let's start with the drivers.

26
00:02:12,280 --> 00:02:20,410
So click on drivers and like I say that the drivers help us to interact with MongoDB with different

27
00:02:20,410 --> 00:02:22,150
programming languages.

28
00:02:22,150 --> 00:02:27,040
So among these drivers what we want is called Node.js.

29
00:02:27,040 --> 00:02:31,360
So click on Node.js and we are ready to go.

30
00:02:31,360 --> 00:02:33,820
So these are the steps we need to follow.

31
00:02:34,210 --> 00:02:36,910
So let me summarize this one in a short way.

32
00:02:36,910 --> 00:02:42,520
So first of all, we need to load from NPM, MongoDB from NPM.

33
00:02:42,520 --> 00:02:50,620
So as soon as NPM comes into play, it means that we need to create a folder and initialize it as NPM

34
00:02:50,620 --> 00:02:52,660
as we have done before.

35
00:02:52,720 --> 00:02:55,630
So now back to my terminal here.

36
00:02:55,660 --> 00:03:02,140
I'm going to create a folder called MongoDB Basics or MongoDB GUID.

37
00:03:02,140 --> 00:03:03,100
So here we go.

38
00:03:03,100 --> 00:03:06,100
I'm k d are Mongo.

39
00:03:07,260 --> 00:03:16,880
DB guide and hit enter and let me see into MongoDB guide and let me clear the console.

40
00:03:16,980 --> 00:03:17,730
All right.

41
00:03:17,730 --> 00:03:27,300
So let me open using code pro to open inside Visual Studio code and here is my Visual Studio code.

42
00:03:27,480 --> 00:03:36,210
The next step is we need to install MongoDB and since you are going to install MongoDB from NPM, we

43
00:03:36,210 --> 00:03:43,650
need to initialize our projects as an RPM by making use of NPM innate.

44
00:03:44,130 --> 00:03:45,810
And let me give it a flag.

45
00:03:46,230 --> 00:03:46,560
Why?

46
00:03:46,590 --> 00:03:50,020
Meaning I want to accept the default configuration.

47
00:03:50,040 --> 00:03:51,540
I will hit enter.

48
00:03:51,690 --> 00:03:53,880
So back to my project here.

49
00:03:53,880 --> 00:03:59,700
I have the package in file where I can install MongoDB.

50
00:04:00,060 --> 00:04:04,070
So let's search for mongodb on npm.

51
00:04:04,180 --> 00:04:04,410
Right.

52
00:04:04,450 --> 00:04:09,210
Or better still, you can click this one and it will take you to NPM.

53
00:04:09,240 --> 00:04:12,960
So let's go ahead and search for Mongo.

54
00:04:14,070 --> 00:04:19,470
DB And let's search for that to see that we have the exact match.

55
00:04:19,470 --> 00:04:23,730
So let's click on that and now let's see MongoDB.

56
00:04:24,000 --> 00:04:27,650
You can see the weekly download 2 million and above.

57
00:04:27,660 --> 00:04:30,360
So let's go ahead and install MongoDB.

58
00:04:30,540 --> 00:04:34,170
So let's click on this one and then back to the terminal.

59
00:04:34,200 --> 00:04:35,730
We can paste that.

60
00:04:35,880 --> 00:04:45,510
But for us to be on the same pipeline, let's install the exact version of MongoDB, which is 4.9.0

61
00:04:45,510 --> 00:04:46,360
in that way.

62
00:04:46,380 --> 00:04:52,230
After one month, if MongoDB changed the code base, the code that we are going to write is going to

63
00:04:52,230 --> 00:04:53,760
be the same as yours.

64
00:04:53,760 --> 00:04:59,400
So let's go ahead and install MongoDB version 4.9.0.

65
00:04:59,400 --> 00:05:14,340
So here we go and p m i mongo db at 4.9.0 hit enter and now MongoDB is installing for us.

66
00:05:14,640 --> 00:05:17,300
Now MongoDB has finished installing.

67
00:05:17,310 --> 00:05:26,900
Let me check my dependencies and I see MongoDB and dependencies with a version 4.9.0.

68
00:05:26,910 --> 00:05:29,370
So now we are ready to go.

69
00:05:29,670 --> 00:05:37,260
So inside the package to adjacent file by default it has selected that we should use index dot js file.

70
00:05:37,290 --> 00:05:40,800
But I like to use server two js file.

71
00:05:40,830 --> 00:05:46,950
But since I'm working with MongoDB, I'm going to make use of MongoDB JS file.

72
00:05:47,400 --> 00:05:56,700
The name is up to you and then I want to use Start Command to start my application by using Node and

73
00:05:56,700 --> 00:06:00,390
then the name of the file which is MongoDB dot.

74
00:06:00,450 --> 00:06:04,200
JS So here we go, MongoDB Dart.

75
00:06:04,200 --> 00:06:09,990
JS So now this file doesn't exist, so let's go ahead and create it here.

76
00:06:09,990 --> 00:06:13,770
So now at the root of my project, I'm going to create Mongo.

77
00:06:14,940 --> 00:06:23,730
DB dot gs inquisitor for me, I have additional package that locked Jason because I use two package

78
00:06:23,730 --> 00:06:26,310
managers that is John and NPM.

79
00:06:26,310 --> 00:06:31,280
So our trust this one and have only one package JSON file.

80
00:06:31,290 --> 00:06:34,920
So now we are able to install MongoDB.

81
00:06:34,950 --> 00:06:38,380
The next step is how can we connect?

82
00:06:38,400 --> 00:06:42,870
So after connecting, then we will start to work with what?

83
00:06:42,870 --> 00:06:45,990
How we can perform crowd operations.

84
00:06:46,080 --> 00:06:46,770
All right.

85
00:06:46,770 --> 00:06:49,950
So let's get into that in the next video.

