1 00:00:00,300 --> 00:00:05,610 In this video you're going to explore the two tools we'll be using throughout this section to deploy 2 00:00:05,610 --> 00:00:08,120 our node j s applications. 3 00:00:08,130 --> 00:00:09,780 The first is get hub end. 4 00:00:09,810 --> 00:00:11,800 The second is Heroku. 5 00:00:11,880 --> 00:00:17,790 Get hub is the very popular software development platform which gives us all of the tools necessary 6 00:00:18,000 --> 00:00:23,700 to manage software development projects whether we're working by ourselves or whether we're working 7 00:00:23,700 --> 00:00:30,330 with others and Heroku gives us all of the tools and infrastructure needed to actually deploy our node 8 00:00:30,390 --> 00:00:34,860 j s applications to a production ready server to get started. 9 00:00:34,860 --> 00:00:41,160 Let's explore both tools in the browser and we'll also create accounts for each over in the browser. 10 00:00:41,160 --> 00:00:46,790 I'm gonna crack open a brand new tab and navigate over to get hub dot com GitHub. 11 00:00:46,800 --> 00:00:51,600 As I mentioned is a development platform making it easy to manage our projects. 12 00:00:51,600 --> 00:00:57,420 This is going to make it easy to track code changes over time to collaborate with others and to track 13 00:00:57,420 --> 00:01:00,750 bugs issues and feature requests. 14 00:01:00,780 --> 00:01:07,950 Now all of those NPM modules we installed all of their code is actually hosted on GitHub with get hub. 15 00:01:07,950 --> 00:01:13,410 You can host a public or private projects depending on whether or not you want to share that particular 16 00:01:13,410 --> 00:01:15,640 code with the outside world. 17 00:01:15,660 --> 00:01:18,690 Let's go ahead and get started by looking at an example. 18 00:01:18,780 --> 00:01:22,330 What I'm gonna do is just google NPM Express. 19 00:01:22,380 --> 00:01:27,900 This is gonna bring us over to the Express package page on NPM J.S. dot com. 20 00:01:27,900 --> 00:01:30,240 This is a place we have been before. 21 00:01:30,420 --> 00:01:36,570 On the right hand side bar near the bottom of this little stats panel is a repository link and this 22 00:01:36,570 --> 00:01:41,190 actually links over to the github project page for express. 23 00:01:41,190 --> 00:01:46,320 If we visit this we can see we have all sorts of interesting information about the project. 24 00:01:46,320 --> 00:01:47,560 We have issues. 25 00:01:47,610 --> 00:01:54,720 We have projects documentation and pull requests a pull request is just a feature suggestion and if 26 00:01:54,720 --> 00:01:57,500 we scroll down we can learn more about the project. 27 00:01:57,510 --> 00:02:03,630 We have all of the files and folders that make up this project and then down below that we have documentation 28 00:02:03,630 --> 00:02:05,250 for how to get started. 29 00:02:05,310 --> 00:02:10,020 So when we create a get Hub project we are essentially creating one of these. 30 00:02:10,020 --> 00:02:15,990 It can be public or private and we're going to use GitHub to track our project code. 31 00:02:16,110 --> 00:02:21,360 So let's go ahead and get started by creating a new account or signing into our existing one. 32 00:02:21,420 --> 00:02:26,550 If you need a new account you can use the sign up form on the home page or you can click sign up right 33 00:02:26,550 --> 00:02:27,300 here. 34 00:02:27,300 --> 00:02:29,520 If you have an existing one that's fine too. 35 00:02:29,520 --> 00:02:31,990 There's no need to create a new account. 36 00:02:32,010 --> 00:02:36,690 I already have one so I'm going to take a quick moment to log in to my existing one. 37 00:02:37,170 --> 00:02:41,050 Now what we see here is information specific to our accounts. 38 00:02:41,100 --> 00:02:44,830 So you're going to see different information than what I have here. 39 00:02:44,850 --> 00:02:48,090 I have all of my code projects on the left hand side. 40 00:02:48,150 --> 00:02:50,690 I have my feed right in the middle and on the right. 41 00:02:50,700 --> 00:02:54,540 I have some discovery suggestions which I typically ignore. 42 00:02:54,540 --> 00:02:57,220 So now we have a get how the account created. 43 00:02:57,240 --> 00:02:59,670 We don't know how to use it but that's OK. 44 00:02:59,670 --> 00:03:03,900 The goal here is to just get everything set up for the rest of the section. 45 00:03:04,020 --> 00:03:07,540 And now what I'd like to do is do the same thing for the other tool. 46 00:03:07,560 --> 00:03:09,390 We're gonna be using which is Heroku. 47 00:03:09,390 --> 00:03:15,870 You can find Heroku on the web by heading over to her Roku dot com her Roku is an application deployment 48 00:03:15,870 --> 00:03:16,800 platform. 49 00:03:16,800 --> 00:03:22,600 It's gonna give us all of the tools and infrastructure necessary to take our application code. 50 00:03:22,680 --> 00:03:27,960 No J.S. applications and deploy them to their production servers. 51 00:03:27,960 --> 00:03:37,050 Now Heroku isn't no J.S. specific you can use Heroku with P HP Ruby on Rails Python Java and other languages. 52 00:03:37,050 --> 00:03:42,930 In this case though we are indeed trying to use Heroku with node now in the end of the day both get 53 00:03:42,930 --> 00:03:47,360 hub and Heroku are businesses which means they do have paid offerings. 54 00:03:47,370 --> 00:03:53,460 That's how they stay in business but both also have generous free tiers allowing you to get started 55 00:03:53,460 --> 00:03:59,760 without needing to pay any money or provide any credit card details and their free tiers are gonna be 56 00:03:59,790 --> 00:04:06,570 more than enough for us to explore both tools and for us to actually get our applications deployed to 57 00:04:06,570 --> 00:04:07,950 production. 58 00:04:07,950 --> 00:04:13,740 Now once again we're gonna need to either log into our existing accounts or sign up for a new one. 59 00:04:13,740 --> 00:04:18,140 If you don't have a Heroku account you can go ahead and click that sign up button. 60 00:04:18,270 --> 00:04:20,070 The account is completely free. 61 00:04:20,070 --> 00:04:24,870 They just need a few basic pieces of information which they ask for down below. 62 00:04:24,870 --> 00:04:28,550 If you already have an account you can log into your existing one. 63 00:04:28,560 --> 00:04:31,990 There is no need to create a new one for this class. 64 00:04:32,040 --> 00:04:35,240 I already have one so I'll take a quick moment to log in. 65 00:04:35,430 --> 00:04:41,190 Now what we see when we actually log in will indeed be different depending on the particular account 66 00:04:41,210 --> 00:04:41,610 here. 67 00:04:41,940 --> 00:04:47,850 I have a bunch of different projects I've created for clients as well as many test projects which I've 68 00:04:47,850 --> 00:04:50,940 used with my various Udemy classes. 69 00:04:51,000 --> 00:04:54,260 So once again you're going to see something completely different to start. 70 00:04:54,330 --> 00:04:58,260 They're likely going to show you some sort of onboarding or welcome screen. 71 00:04:58,260 --> 00:05:05,380 That's OK we'll work the process of creating and setting up a new project in just a few videos. 72 00:05:05,380 --> 00:05:11,950 For now the goal is to just have an account for get hub and for Heroku and to be logged in for each. 73 00:05:11,950 --> 00:05:17,610 The last thing I want to do in this video is install Heroku whose command line tools these are gonna 74 00:05:17,620 --> 00:05:23,410 give us access to various commands we can use from the terminal to do things like deploy our latest 75 00:05:23,410 --> 00:05:30,390 code changes to the production server allowing users to see the latest changes to the application. 76 00:05:30,460 --> 00:05:35,660 The tools can be accessed by heading over to a new tab and Googling Heroku. 77 00:05:35,670 --> 00:05:41,570 S.L. I this is gonna bring us over to an article that the Heroku Dev center. 78 00:05:41,620 --> 00:05:45,040 So here I'm at Dev center dot Heroku dot com. 79 00:05:45,040 --> 00:05:47,210 This is the U.R.L. that we want. 80 00:05:47,350 --> 00:05:53,590 And once we're here at the Heroku Seelye article the first thing they talk about is how to install the 81 00:05:53,590 --> 00:05:54,550 tools. 82 00:05:54,550 --> 00:06:00,820 There are installers for Mac OS and for Windows and down below there are various commands you can run 83 00:06:01,030 --> 00:06:05,190 to install it on a boon to or other Linux distributions. 84 00:06:05,200 --> 00:06:10,720 In my case I am indeed running on a Mac so I'm gonna take a quick moment to grab the installer take 85 00:06:10,720 --> 00:06:15,700 a quick moment to grab the installer for your operating system and get the tools installed. 86 00:06:16,030 --> 00:06:21,670 I'm gonna download the installer and this is one of those very easy to use click next to type installers 87 00:06:21,670 --> 00:06:23,730 for Mac and Windows users. 88 00:06:23,740 --> 00:06:27,540 All we have to do is continue through the little installation wizard. 89 00:06:27,550 --> 00:06:33,820 There is no need to customize any of the options and once it actually goes through the entire process 90 00:06:34,060 --> 00:06:39,850 we're gonna have a new set of commands that we can access from the terminal before we wrap up the video. 91 00:06:39,850 --> 00:06:45,880 We will take a few moments to explore some of those commands and actually test things out to make sure 92 00:06:45,880 --> 00:06:49,320 the Heroku CLIA was installed correctly. 93 00:06:49,360 --> 00:06:55,600 Right here the installer has completed I'm going to close it and trash the installer and now it's time 94 00:06:55,600 --> 00:06:57,690 to test out our new commands. 95 00:06:57,760 --> 00:07:02,050 Now to actually use these we are going to need to restart our terminal. 96 00:07:02,050 --> 00:07:09,280 So from Visual Studio code we can use controls C to shut down node mod then I can use this little trash 97 00:07:09,280 --> 00:07:11,390 can to close the terminal. 98 00:07:11,410 --> 00:07:15,690 Now we can open it up again essentially restarting it right here. 99 00:07:15,700 --> 00:07:17,140 Terminal new terminal. 100 00:07:17,140 --> 00:07:22,180 Or note the keyboard shortcut become familiar with it as it's super useful. 101 00:07:22,180 --> 00:07:29,320 And from here we can test out our new commands the Heroku CLIA gives us access to the new Heroku command 102 00:07:29,320 --> 00:07:33,530 and we can use this to do all sorts of interesting things for the moment. 103 00:07:33,550 --> 00:07:38,770 I'm just gonna use it with the V flag to print the version of the tools we have installed. 104 00:07:38,770 --> 00:07:43,180 Now if you get an error when you run this you know that things didn't install correctly. 105 00:07:43,210 --> 00:07:46,470 You can always crack open a new question in the course Q and A. 106 00:07:46,720 --> 00:07:48,430 And we'll work with you to fix that. 107 00:07:48,820 --> 00:07:52,340 Otherwise you should see something similar to what I have here. 108 00:07:52,360 --> 00:07:54,790 It starts off with the Heroku version. 109 00:07:54,790 --> 00:07:58,850 Then there's some additional information about our OS and our node version. 110 00:07:58,880 --> 00:08:02,380 The things I have highlighted now are gonna look different for you. 111 00:08:02,440 --> 00:08:05,940 You should see some sort of Heroku version upfront. 112 00:08:06,100 --> 00:08:07,230 If you're seeing that. 113 00:08:07,240 --> 00:08:14,260 That means her Roku was installed successfully and the last command we're going to use is Heroku log 114 00:08:14,260 --> 00:08:15,010 in. 115 00:08:15,010 --> 00:08:19,900 This is going to link the commands we run from the terminal with our Heroku account so we can actually 116 00:08:19,930 --> 00:08:24,190 manage our projects from right here in visual studio code. 117 00:08:24,220 --> 00:08:31,150 Now when we run her Roku log in it it's going to ask us to open up a new tab in the browser by pressing 118 00:08:31,210 --> 00:08:32,080 a key. 119 00:08:32,080 --> 00:08:38,980 Pretty much any key but the Q key I'll press space that's going to crack open a brand new tab in the 120 00:08:38,980 --> 00:08:45,970 browser asking us to log in to the Heroku S.L. eye and since I'm already logged into my Heroku account 121 00:08:46,120 --> 00:08:48,190 we just did that a few minutes ago. 122 00:08:48,190 --> 00:08:54,460 All I need to do is click the log in button I can see that I have successfully logged in and it's telling 123 00:08:54,460 --> 00:08:56,530 me I can close that tab. 124 00:08:56,530 --> 00:09:00,110 And from the terminal I'm getting some brand new output right here. 125 00:09:00,190 --> 00:09:07,100 I can see logging in is done and I can see I am logged in as followed by my Heroku account email. 126 00:09:07,210 --> 00:09:12,880 Right here you should be seeing a similar message with your email address showing up if you're seeing 127 00:09:12,880 --> 00:09:13,380 that. 128 00:09:13,420 --> 00:09:15,340 That means that you're done for the video. 129 00:09:15,400 --> 00:09:21,910 You have a github account you have a Heroku account and you have access to the Heroku command line tools 130 00:09:22,150 --> 00:09:25,810 to create and deploy your node projects. 131 00:09:25,810 --> 00:09:27,040 That's where we're going to stop. 132 00:09:27,040 --> 00:09:33,400 For this video we're not quite sure how to deploy our projects just yet but we now at least know what 133 00:09:33,400 --> 00:09:37,980 tools we're going to use to get that done in the next couple of videos. 134 00:09:38,020 --> 00:09:42,750 We're going to talk about how we'll put all of this together by using version control. 135 00:09:42,760 --> 00:09:44,700 I'm really excited to get to that. 136 00:09:44,710 --> 00:09:47,780 So stay tuned and I'll see you in the next one.