1 00:00:01,010 --> 00:00:02,010 Hey there, 2 00:00:02,010 --> 00:00:04,700 let's now create a remote database 3 00:00:04,700 --> 00:00:07,410 hosted on MongoDB Atlas. 4 00:00:07,410 --> 00:00:11,280 So, for developing our project we will actually not use 5 00:00:11,280 --> 00:00:13,830 a local database on our computer, 6 00:00:13,830 --> 00:00:16,610 like we've been doing in the section until this point. 7 00:00:16,610 --> 00:00:19,300 So, instead, we're gonna use a remote database 8 00:00:19,300 --> 00:00:22,200 hosted on a service called Atlas, 9 00:00:22,200 --> 00:00:24,550 which is actually owned by the same company 10 00:00:24,550 --> 00:00:25,650 that involves MongoDB. 11 00:00:27,710 --> 00:00:30,280 And again, on the MongoDB website, 12 00:00:30,280 --> 00:00:32,180 let's move over to Products, 13 00:00:32,180 --> 00:00:34,603 and then here you have MongoDB Atlas. 14 00:00:36,210 --> 00:00:40,740 So Atlas is a so-called database as a service provider 15 00:00:40,740 --> 00:00:42,790 which takes all the pain of managing 16 00:00:42,790 --> 00:00:45,460 and scaling databases away from us. 17 00:00:45,460 --> 00:00:47,677 So that already is a huge advantage for us 18 00:00:47,677 --> 00:00:51,500 but it's also extremely useful to always have our data 19 00:00:51,500 --> 00:00:53,820 basically in the Cloud, because this way 20 00:00:53,820 --> 00:00:56,390 we can develop our application from everywhere 21 00:00:56,390 --> 00:00:59,280 and, even more importantly, we don't have to export data 22 00:00:59,280 --> 00:01:01,880 from the local database and then upload it 23 00:01:01,880 --> 00:01:04,150 to a hosted database, once we are ready 24 00:01:04,150 --> 00:01:05,900 to deploy our application. 25 00:01:05,900 --> 00:01:09,060 So instead we simply use this hosted database 26 00:01:09,060 --> 00:01:11,501 right from the beginning, instead of even messing 27 00:01:11,501 --> 00:01:15,350 with local databases in the first place, all right? 28 00:01:15,350 --> 00:01:17,320 Now, of course, if you are one of the students 29 00:01:17,320 --> 00:01:19,490 who doesn't have access to the internet 30 00:01:19,490 --> 00:01:22,560 then you just have to keep using a local database 31 00:01:22,560 --> 00:01:24,580 just as we learned until this lecture. 32 00:01:24,580 --> 00:01:27,040 So that's no problem at all, I will of course teach you 33 00:01:27,040 --> 00:01:29,030 how to connect our application later, 34 00:01:29,030 --> 00:01:31,490 with both a database hosted on Atlas 35 00:01:31,490 --> 00:01:34,420 and also a local database, all right? 36 00:01:34,420 --> 00:01:38,290 Anyway, let's now go ahead and start your free account. 37 00:01:38,290 --> 00:01:41,430 Okay, so just Start Free and then down here 38 00:01:41,430 --> 00:01:43,560 you should create your account. 39 00:01:43,560 --> 00:01:45,510 Of course I already have my account, 40 00:01:45,510 --> 00:01:47,060 so I'm not gonna do that. 41 00:01:47,060 --> 00:01:49,610 So please just pause the video here, at this point, 42 00:01:49,610 --> 00:01:51,850 and once you're ready, just come back here 43 00:01:51,850 --> 00:01:55,190 to set up our first remote database. 44 00:01:55,190 --> 00:01:58,000 All right, so when you log in, into Atlas, 45 00:01:58,000 --> 00:02:00,100 it should look something like this. 46 00:02:00,100 --> 00:02:03,340 I'm not sure how it looks the first time when you log in 47 00:02:03,340 --> 00:02:06,970 but at some place you will be able to create a new project. 48 00:02:06,970 --> 00:02:09,290 So in this case, I have here the button 49 00:02:09,290 --> 00:02:11,550 or you can also come here to the left side 50 00:02:11,550 --> 00:02:14,640 and then down here create a New Project. 51 00:02:14,640 --> 00:02:17,368 Now I already have two natours projects here 52 00:02:17,368 --> 00:02:20,860 simply because I had to build of course this application 53 00:02:20,860 --> 00:02:22,850 before creating the course. 54 00:02:22,850 --> 00:02:26,803 And so, let's now create yet another one. 55 00:02:28,540 --> 00:02:32,290 So let me call this one natours-app, okay 56 00:02:32,290 --> 00:02:34,260 but you can call yours just natours, 57 00:02:34,260 --> 00:02:38,510 so just like this or, if you want to have the same name, 58 00:02:38,510 --> 00:02:42,860 then just go ahead and call it natours-app, as well, okay? 59 00:02:42,860 --> 00:02:44,313 So, create a new project. 60 00:02:45,470 --> 00:02:49,060 You should then give yourself the Project Owner Permission 61 00:02:49,060 --> 00:02:51,790 which should by default be enabled already 62 00:02:51,790 --> 00:02:54,180 and then just create the project. 63 00:02:54,180 --> 00:02:56,323 Wait a little bit until it's ready. 64 00:02:58,500 --> 00:02:59,890 And here we go. 65 00:02:59,890 --> 00:03:01,670 So we have our project created, 66 00:03:01,670 --> 00:03:04,210 now it's time to Build a Cluster. 67 00:03:04,210 --> 00:03:07,260 And a cluster is basically like an instance 68 00:03:07,260 --> 00:03:10,610 of our database, okay? 69 00:03:10,610 --> 00:03:12,760 So now it's time to configure the cluster. 70 00:03:12,760 --> 00:03:15,070 I'm simply using the default settings here 71 00:03:15,070 --> 00:03:16,320 because that is gonna allow me 72 00:03:16,320 --> 00:03:19,370 to create a free cluster, okay? 73 00:03:19,370 --> 00:03:22,720 So that's what I want to do for this application. 74 00:03:22,720 --> 00:03:24,820 So all of this fine by me, 75 00:03:24,820 --> 00:03:28,920 so this M0 here stands for the free cluster 76 00:03:28,920 --> 00:03:32,090 which is gonna give us 512MB of storage 77 00:03:32,090 --> 00:03:36,420 and a maximum of 100 simultaneous connections, okay? 78 00:03:36,420 --> 00:03:39,590 If you want more, then of course, you can start paying 79 00:03:39,590 --> 00:03:42,660 for this, but in this case of course 80 00:03:42,660 --> 00:03:44,120 that's not what we want. 81 00:03:44,120 --> 00:03:47,193 So we want to just build everything for free for now. 82 00:03:48,350 --> 00:03:50,750 Now it's asking me for this stupid capture here. 83 00:03:52,520 --> 00:03:55,330 So our cluster is now being created, 84 00:03:55,330 --> 00:03:57,500 which usually takes some time 85 00:03:57,500 --> 00:03:59,560 and so I'm just gonna come back to just 86 00:03:59,560 --> 00:04:01,583 once this is actually ready. 87 00:04:02,610 --> 00:04:05,552 And it's done! So, this is how your project 88 00:04:05,552 --> 00:04:10,260 and your brand new cluster should look like at this point. 89 00:04:10,260 --> 00:04:12,610 Okay? And so this step is ready, 90 00:04:12,610 --> 00:04:16,500 now you have a blank empty database, ready to connect 91 00:04:16,500 --> 00:04:18,710 to your own development computer. 92 00:04:18,710 --> 00:04:21,030 And so that is exactly what we're gonna do 93 00:04:21,030 --> 00:04:22,313 in the next video.