1 00:00:00,210 --> 00:00:04,280 In this video I promised we'd be connecting to our database from to J. 2 00:00:04,280 --> 00:00:09,330 S I'm actually going to push that off to the next video as there's one more important thing we need 3 00:00:09,330 --> 00:00:14,320 to install before it really makes sense to interact with the database using Node. 4 00:00:14,550 --> 00:00:19,630 What we're going to install in this video is a mongo D.B. admin tool. 5 00:00:19,650 --> 00:00:26,940 This is gonna be a gooey a graphic user interface for managing your Mongo DB database and the data it 6 00:00:26,940 --> 00:00:27,860 contains. 7 00:00:27,870 --> 00:00:34,350 The goal of the database admin tool is to provide us with a nice visual interface for managing our Mongo 8 00:00:34,350 --> 00:00:35,720 DB data. 9 00:00:35,730 --> 00:00:41,390 It's not meant to serve as a replacement for connecting to your database from node j s we're still gonna 10 00:00:41,430 --> 00:00:42,190 do that. 11 00:00:42,210 --> 00:00:49,050 The whole point of the admin tool is just to provide us with an easier way to manage our data as developers 12 00:00:49,200 --> 00:00:51,470 as we're building out the application. 13 00:00:51,480 --> 00:00:56,820 Now we can find the tool that we're gonna be using by heading over to a new browser tab and we are going 14 00:00:56,820 --> 00:00:59,720 to Google robo three ti. 15 00:00:59,790 --> 00:01:05,850 Now the reason I'm having you Google the product name as opposed to entering an explicit U.R.L. is because 16 00:01:05,850 --> 00:01:08,180 they recently rebranded themselves. 17 00:01:08,190 --> 00:01:11,360 This tool was formerly known as robo Mongo. 18 00:01:11,400 --> 00:01:17,060 It has since been renamed to robo three t and this is the Mongo D.B. addon tool. 19 00:01:17,070 --> 00:01:20,520 We're going to use as a companion throughout the class. 20 00:01:20,520 --> 00:01:24,370 Now this is a free tool available for all operating systems. 21 00:01:24,390 --> 00:01:30,190 So let's go ahead and get it installed right here as we head to the robo 3 home page. 22 00:01:30,210 --> 00:01:37,740 They have two product offerings they have studio three T and they have robo 380 robo 3D is the Mongo 23 00:01:37,770 --> 00:01:41,080 D.B. gooey the tool that we want to install. 24 00:01:41,250 --> 00:01:45,870 Studio Three T has more advanced features that we're not gonna use in the class. 25 00:01:45,870 --> 00:01:50,700 Everything that we need to manage our database is available in their free offering. 26 00:01:50,700 --> 00:01:54,210 So right here I'm going to click download robo 3 T. 27 00:01:54,360 --> 00:01:59,460 Which just brings me over to another page where I have to click the exact same button and once I click 28 00:01:59,460 --> 00:02:06,660 it a second time I'll be able to view the installation options for Linux for Mac and for Windows for 29 00:02:06,660 --> 00:02:07,170 Windows. 30 00:02:07,170 --> 00:02:13,710 You get an E XY executable for Mac you get a DMV installer and for Linux you get an archive. 31 00:02:13,710 --> 00:02:15,240 So right here I am on a Mac. 32 00:02:15,270 --> 00:02:20,820 So I'm going to take a quick moment to actually get this installed so we can set it up together in this 33 00:02:20,820 --> 00:02:21,420 video. 34 00:02:21,450 --> 00:02:26,610 I'm going to download the DMV file and once that's downloaded we'll take a quick moment to install it 35 00:02:26,640 --> 00:02:27,590 and set it up. 36 00:02:27,630 --> 00:02:33,570 Take a quick moment to grab the correct installer for your operating system right here for the Mac. 37 00:02:33,600 --> 00:02:40,430 Once I open up the DMV all I need to do is drag the application file over to my applications folder. 38 00:02:40,500 --> 00:02:41,780 Then we can start it up. 39 00:02:41,820 --> 00:02:44,330 So right here I have robo 3D. 40 00:02:44,400 --> 00:02:50,640 I'm gonna drag that over to applications then I'm going to open up applications and navigate to R for 41 00:02:50,640 --> 00:02:52,680 robo 3 T and down below. 42 00:02:52,680 --> 00:02:55,560 I have the program sitting right here. 43 00:02:55,560 --> 00:03:00,420 I'm gonna right click it to open it and I'm doing this for the first time to confirm that I do want 44 00:03:00,420 --> 00:03:07,070 to open an application downloaded from the Internet as opposed to one downloaded from the Mac App Store. 45 00:03:07,110 --> 00:03:12,510 I'm gonna confirm it and this is going to open up the robo 3 tee program right here. 46 00:03:12,510 --> 00:03:19,920 Robo 3 T is bringing up this Mongo DB connections panel where we can connect to our local Mongo DB database. 47 00:03:19,920 --> 00:03:23,910 Take a quick moment to get robo 3D installed and opened. 48 00:03:23,910 --> 00:03:26,820 Then you can come back and continue on with the video. 49 00:03:26,850 --> 00:03:30,700 So right here it's asking us to manage our connections we don't have any. 50 00:03:30,720 --> 00:03:35,120 So we're gonna go ahead and actually create one when we create a connection. 51 00:03:35,130 --> 00:03:38,490 There are a ton of different options we can configure up here. 52 00:03:38,490 --> 00:03:44,280 We have a whole bunch of tabs for more advanced setups and we'll explore some of these as we setup a 53 00:03:44,280 --> 00:03:48,180 production Mongo DB database a bit later in the class. 54 00:03:48,330 --> 00:03:54,000 For now for our local host setup the only thing we need to change is right here name. 55 00:03:54,090 --> 00:03:58,660 This is a label for the connection and we can call this literally anything we like. 56 00:03:58,680 --> 00:04:06,990 I'm gonna call this local Mongo D.B. database now down below on this first connection tab I also have 57 00:04:07,050 --> 00:04:14,070 address and port address is correct the database is running on local host and the port is also correct 58 00:04:14,340 --> 00:04:20,280 it's using the default Mongo DB port which we saw in our connection message when we first started up 59 00:04:20,280 --> 00:04:21,210 the server. 60 00:04:21,210 --> 00:04:27,450 We saw that the server was listening on Port 2 7 0 1 7 and here that's the port we're trying to connect 61 00:04:27,450 --> 00:04:28,020 on. 62 00:04:28,230 --> 00:04:34,070 Now before we actually say of the connection we can test it out if we click this test button over here. 63 00:04:34,170 --> 00:04:40,050 We should see green checkmarks for everything allowing us to actually confirm that the connection settings 64 00:04:40,080 --> 00:04:41,310 are working. 65 00:04:41,310 --> 00:04:47,130 We can now close the connection test panel I can click save and we can connect to our database for the 66 00:04:47,130 --> 00:04:48,320 first time. 67 00:04:48,420 --> 00:04:53,850 Right here we can just double click that connection to connect and as long as you're not seeing an error 68 00:04:53,880 --> 00:04:54,690 pop up. 69 00:04:54,690 --> 00:04:57,450 That means things were connected correctly. 70 00:04:57,450 --> 00:05:02,290 Now for the moment there's nothing interesting to look at because we haven't inserted any data into 71 00:05:02,290 --> 00:05:03,330 the database. 72 00:05:03,400 --> 00:05:05,380 We'll get to that in the next video. 73 00:05:05,530 --> 00:05:11,110 For the moment though we are going to run a single command on the database asking for the version of 74 00:05:11,110 --> 00:05:18,010 Mongo DB it's running as long as we get the version back then we know for certain that robo three ti 75 00:05:18,190 --> 00:05:22,240 was able to connect to the database successfully to do that. 76 00:05:22,240 --> 00:05:27,340 Oh we're gonna do is right click our connection over here in this left hand panel and we're going to 77 00:05:27,340 --> 00:05:29,090 click open shell. 78 00:05:29,110 --> 00:05:33,560 This is going to allow us to run a command directly against Mongo D.B.. 79 00:05:33,670 --> 00:05:36,010 And in this case we're gonna use the following. 80 00:05:36,010 --> 00:05:43,180 That's D.B. dot version which we're going to call as if it were a method on the DB object. 81 00:05:43,210 --> 00:05:49,510 Now right here what we have looks a whole lot like Javascript and that is because it is javascript when 82 00:05:49,510 --> 00:05:54,540 we're working with Mongo D.B. and interacting with it via the Mongo DB shell. 83 00:05:54,730 --> 00:05:58,480 We're just using JavaScript to manipulate the database. 84 00:05:58,480 --> 00:06:02,830 So in this case we are asking for the version of Mongo D.B. that's running. 85 00:06:02,830 --> 00:06:08,800 If we fire this off we should get the correct version back confirming that our connection was able to 86 00:06:08,800 --> 00:06:14,770 connect to the database and that the database was able to respond right here to actually run this. 87 00:06:14,770 --> 00:06:17,020 We just click that green play button. 88 00:06:17,020 --> 00:06:22,420 It's going to fire off the command and down below we get our version back here I get the version of 89 00:06:22,420 --> 00:06:26,750 Mongo D.B. that I installed for point zero point for you. 90 00:06:26,780 --> 00:06:31,270 You should see the version of Mongo D.B. that you installed with this in place. 91 00:06:31,270 --> 00:06:32,980 We've confirmed two things. 92 00:06:32,980 --> 00:06:39,290 We've confirmed that our database is up and running correctly and that robo 3 T is up and running correctly. 93 00:06:39,430 --> 00:06:44,710 And now we're going to continue on to the next video where we're actually going to connect to the database 94 00:06:44,710 --> 00:06:50,060 from node j s and insert our very first documents into Mongo D.B.. 95 00:06:50,110 --> 00:06:51,400 I'm excited to get to that. 96 00:06:51,460 --> 00:06:54,460 So let's go ahead and jump right in to the next one.