1 00:00:01,470 --> 00:00:03,120 Hey, welcome back. 2 00:00:03,270 --> 00:00:08,790 Very high energy, because we're moving on to a very exciting portion of the course we've now seen how 3 00:00:08,790 --> 00:00:15,990 to take database and my SQL, everything we know and combine it with a node file, a single file that 4 00:00:15,990 --> 00:00:19,380 doesn't do I mean, it depends on your impression of it. 5 00:00:19,380 --> 00:00:24,240 It doesn't do a whole lot, just inserts, but it inserts 500 things, which is pretty cool and they're 6 00:00:24,240 --> 00:00:25,530 all randomly generated. 7 00:00:25,530 --> 00:00:29,550 But that's not an application that's still useful for our application. 8 00:00:29,550 --> 00:00:30,720 We'll be able to use that. 9 00:00:30,720 --> 00:00:35,490 Just to recap, the whole reason we're doing that is so that when we start up our application, we have 10 00:00:35,490 --> 00:00:39,870 some data in there, we have something to work with rather than totally empty database or something 11 00:00:39,870 --> 00:00:41,310 that has two users. 12 00:00:41,310 --> 00:00:46,510 We have 500 realistic randomly generated emails and created at dates. 13 00:00:46,920 --> 00:00:47,280 Okay. 14 00:00:47,610 --> 00:00:48,450 So we've done that. 15 00:00:48,450 --> 00:00:49,200 We have that. 16 00:00:49,200 --> 00:00:52,560 Now we're moving on to the web application portion. 17 00:00:52,560 --> 00:00:59,040 So remember this is join us our mailing app or waitlist app where there's a nice page with it looks 18 00:00:59,040 --> 00:00:59,490 styled. 19 00:00:59,490 --> 00:01:01,530 It's nice it says join us in big letters. 20 00:01:01,530 --> 00:01:04,110 It says How many users have currently joined? 21 00:01:04,230 --> 00:01:06,630 And there's also a guarantee, 100%. 22 00:01:06,630 --> 00:01:07,590 It's not a cult. 23 00:01:07,590 --> 00:01:12,240 And then there's a form at the bottom where you can actually enter your email to join the list. 24 00:01:12,240 --> 00:01:13,650 So we have to get there. 25 00:01:13,650 --> 00:01:16,260 We're going to start with the basics of a web app. 26 00:01:16,260 --> 00:01:20,400 So just like we had to start with the basics of Node, we're now starting with the basics of building 27 00:01:20,400 --> 00:01:21,600 web applications. 28 00:01:22,110 --> 00:01:22,470 Okay. 29 00:01:22,590 --> 00:01:25,650 That brings us to something called Express. 30 00:01:25,650 --> 00:01:30,990 So if you've taken my other course or if you're familiar with Node and you've used it in any web development 31 00:01:30,990 --> 00:01:34,230 capacity, you've probably come across the Framework Express. 32 00:01:34,230 --> 00:01:35,910 It's a web development framework. 33 00:01:35,910 --> 00:01:38,160 It helps us make applications faster. 34 00:01:38,550 --> 00:01:44,070 So if you're not familiar with frameworks in 10 seconds, what they are are tools, libraries that are 35 00:01:44,070 --> 00:01:48,210 a bit more complex, bit more controlling of how you write your code. 36 00:01:48,210 --> 00:01:49,650 They dictate things for you. 37 00:01:49,650 --> 00:01:52,590 You play by the rules, but they help you make things faster. 38 00:01:52,590 --> 00:01:56,310 So a web development framework helps you make websites faster. 39 00:01:56,310 --> 00:02:01,920 There are iOS or game development frameworks that help you make games faster, so they kind of limit 40 00:02:01,920 --> 00:02:07,230 your freedom a bit, but they empower you because they speed you up and they let it. 41 00:02:07,260 --> 00:02:09,090 They let you focus on the things that matter. 42 00:02:09,090 --> 00:02:13,590 So with all that said, Express is very simple, a lightweight framework. 43 00:02:13,590 --> 00:02:19,890 What it allows us to do is once we install it and include it in a file, we can very quickly make a 44 00:02:19,890 --> 00:02:20,820 web application. 45 00:02:20,820 --> 00:02:27,510 So something like Faker is a package that allows us to quickly get random data, a very small kind of 46 00:02:27,510 --> 00:02:30,480 feature that's it's useful, but it's a small thing. 47 00:02:30,510 --> 00:02:35,970 Express is a package that when you use it and install it, it does a lot. 48 00:02:35,970 --> 00:02:37,830 It sets up a server for you. 49 00:02:37,830 --> 00:02:39,330 It listens for incoming requests. 50 00:02:39,330 --> 00:02:41,430 It figures out how to respond to requests. 51 00:02:41,430 --> 00:02:47,190 It handles HTML, CSS in responding with that, it figures out how to parse a response body. 52 00:02:47,190 --> 00:02:49,920 All these things will go into, but it does a lot. 53 00:02:50,190 --> 00:02:52,950 So let's take a look very quickly at the documentation. 54 00:02:52,950 --> 00:02:58,890 Express is a fast, opinionated, minimalist web framework for Node.js. 55 00:02:59,160 --> 00:03:02,340 As you can see, you can just install it and PM install express. 56 00:03:02,340 --> 00:03:07,470 We'll talk about Dash Dash Save in just a second and you can read more about it here. 57 00:03:07,470 --> 00:03:12,090 Basically, it provides a robust set of features for web applications. 58 00:03:12,180 --> 00:03:13,620 It's lightweight. 59 00:03:13,620 --> 00:03:18,180 So what that means, if I go over here to Node.js Frameworks is a site that I found. 60 00:03:18,600 --> 00:03:22,200 It has a list of some of the most popular node framework. 61 00:03:22,200 --> 00:03:26,070 There are a ton of them out there because people love using frameworks for good reason. 62 00:03:26,070 --> 00:03:27,690 They help you make things faster. 63 00:03:28,260 --> 00:03:32,970 There's two categories that this person has categorized them into Sinatra like and rails like. 64 00:03:33,150 --> 00:03:35,880 Basically, this comes from Ruby. 65 00:03:36,210 --> 00:03:38,520 These are two Ruby frameworks, Sinatra and Rails. 66 00:03:38,520 --> 00:03:39,540 Rails you might have heard of. 67 00:03:39,540 --> 00:03:44,280 It's a bigger framework, very popular in Ruby, but it controls everything. 68 00:03:44,280 --> 00:03:45,810 It's very strict. 69 00:03:46,140 --> 00:03:50,280 Sinatra is much lighter weight, meaning that you have more freedom to make decisions. 70 00:03:50,280 --> 00:03:54,090 It's less opinionated, which means that you can configure things how you want. 71 00:03:54,090 --> 00:03:58,680 But also the advantage of something like Rails is that you don't have to make decisions. 72 00:03:58,860 --> 00:04:01,140 For example, how to structure your files. 73 00:04:01,140 --> 00:04:03,510 Where do I put my CSS files in rails? 74 00:04:03,510 --> 00:04:04,350 You don't have a choice. 75 00:04:04,350 --> 00:04:05,850 And Sinatra, you have to decide. 76 00:04:05,850 --> 00:04:11,370 So with that said, there are all of these frameworks for Node Express is the top one here that we're 77 00:04:11,370 --> 00:04:12,120 going to use. 78 00:04:12,120 --> 00:04:13,110 But there are other ones. 79 00:04:13,110 --> 00:04:16,769 There's Sales and Getty are two that I've used COA. 80 00:04:17,040 --> 00:04:20,370 I don't know if it's pronounced KOA or KOA, it's one that's becoming popular now. 81 00:04:20,600 --> 00:04:22,050 A lot of people are using too. 82 00:04:22,590 --> 00:04:26,850 So anyways, I'm just trying to point out here that there are a bunch of frameworks, just like when 83 00:04:26,850 --> 00:04:31,950 I said we could have used any language to talk to my SQL, we could use any node framework to make a 84 00:04:31,950 --> 00:04:32,580 web app. 85 00:04:32,910 --> 00:04:35,890 We're happening to use Express OC. 86 00:04:36,240 --> 00:04:40,410 So the first thing I recommend here is to look at the documentation for Express. 87 00:04:40,410 --> 00:04:44,670 If you're curious, if you haven't taken a course in it, you're not familiar with it or you have never 88 00:04:44,670 --> 00:04:45,870 worked with a web framework. 89 00:04:45,870 --> 00:04:48,270 The documentation is pretty straightforward. 90 00:04:48,270 --> 00:04:51,840 If you click on getting started, you don't have to go through all of it. 91 00:04:52,020 --> 00:04:58,440 But if we actually go to do like a Hello World, here's a simple app that will be making in just a moment. 92 00:04:58,560 --> 00:04:59,910 But it has a nice kind of. 93 00:04:59,940 --> 00:05:05,880 Walk through of using express how you write certain things, what the syntax is, and then there's a 94 00:05:05,880 --> 00:05:09,090 guide that's much more in depth, and then there's a reference. 95 00:05:09,450 --> 00:05:14,460 When you click on API reference, make sure you're doing for point X, the most recent and this is sort 96 00:05:14,460 --> 00:05:19,650 of like the think of the My SQL Docs, there's all these methods that we see over here and you can read 97 00:05:19,650 --> 00:05:21,540 about them over here. 98 00:05:21,630 --> 00:05:24,780 So we'll be referring back to these docs as we go through the course. 99 00:05:25,260 --> 00:05:26,960 And for now, that's where we'll leave off. 100 00:05:26,970 --> 00:05:31,290 All I wanted to do in this video was Introduce Express, tell you that it's a node framework, show 101 00:05:31,290 --> 00:05:32,850 you the website, the documentation. 102 00:05:32,850 --> 00:05:37,350 Then in the next video, we're going to install it and create our own first application. 103 00:05:38,230 --> 00:05:39,280 First Web app.