WEBVTT

00:01.440 --> 00:03.320
Hey welcome back.

00:03.330 --> 00:07.850
Very high energy because we're moving on to a very exciting portion of the course.

00:07.860 --> 00:10.140
We've now seen how to take a database in my ass.

00:10.140 --> 00:16.790
Q Well everything we know and combine it with a node file a single file that doesn't do.

00:16.800 --> 00:19.350
I mean it depends on your impression of it.

00:19.350 --> 00:24.420
It doesn't do a whole lot just inserts but it inserts 500 things are just pretty cool and they're all

00:24.420 --> 00:25.450
randomly generated.

00:25.680 --> 00:30.800
But that's not an application that's still useful for our application will be able to use that.

00:30.810 --> 00:35.490
Just to recap the whole reason we're doing that is so that when we start up our application we have

00:35.490 --> 00:36.420
some data in there.

00:36.510 --> 00:41.290
We have something to work with rather than totally empty database or something that has two users.

00:41.490 --> 00:46.620
We have 500 realistic randomly generated emails and created at dates.

00:46.970 --> 00:47.470
OK.

00:47.760 --> 00:48.450
So we've done that.

00:48.450 --> 00:49.250
We have that.

00:49.380 --> 00:52.660
Now we're moving on to the web application portion.

00:52.680 --> 00:59.430
So remember this is join us our mailing apper waitlist app where there's a nice page with it looks style

00:59.430 --> 01:01.510
that's nice it says join us in big letters.

01:01.620 --> 01:04.090
It says how many users have currently joined.

01:04.440 --> 01:06.630
And there's also a guarantee 100 percent.

01:06.630 --> 01:07.580
It's not a cult.

01:07.770 --> 01:12.410
And then there's a form at the bottom where you can actually enter your email to join the list.

01:12.450 --> 01:13.680
So we have to get there.

01:13.770 --> 01:16.260
We're going to start with the basics of a web app.

01:16.350 --> 01:20.340
So just like we had to start with the basics of node we're now starting with the basics of building

01:20.430 --> 01:22.140
web applications.

01:22.140 --> 01:22.540
OK.

01:22.680 --> 01:25.700
That brings us to something called Express.

01:25.860 --> 01:30.960
So if you've taken the course or if you're familiar with node and you've used it in any web development

01:30.960 --> 01:34.190
capacity you've probably come across the framework Express.

01:34.410 --> 01:38.610
It's a Web development framework that helps us make applications faster.

01:38.670 --> 01:44.100
So if you're not familiar with frameworks in 10 seconds what they are are tools libraries that are a

01:44.100 --> 01:48.210
bit more complex a bit more controlling of how you write your code.

01:48.210 --> 01:49.620
They dictate things for you.

01:49.650 --> 01:52.710
You play by the rules but they help you make things faster.

01:52.740 --> 01:56.490
So a web development framework helps you make Web sites faster.

01:56.490 --> 02:02.040
There are iOS or game development frameworks that help you make games faster so they can limit your

02:02.040 --> 02:08.430
freedom a bit but they empower you because they speed you up and they let it they let you focus on things

02:08.430 --> 02:09.240
that matter.

02:09.240 --> 02:15.900
So with all that said Express it's very simple a lightweight framework that allows us to do is once

02:15.900 --> 02:20.800
we install it and included in a file we can very quickly make a web application.

02:20.850 --> 02:27.300
So something like faker is a package that allows us to quickly get random data a very small kind of

02:27.570 --> 02:30.690
feature that's it's useful but it's a small thing.

02:30.690 --> 02:36.030
Express is a package that when you use it and install it it does a lot.

02:36.030 --> 02:41.560
It sets up just a server for you it listens for incoming requests it figures out how to respond to requests.

02:41.580 --> 02:44.920
It handles H-2 on CSSA in responding with that.

02:45.110 --> 02:50.000
It figures out how to parse a response body all these things will go into but it does a lot.

02:50.310 --> 02:51.120
So let's take a look.

02:51.120 --> 02:57.930
Very quickly the documentation express J s dot com a fast and opinionated minimalist web framework for

02:57.930 --> 02:58.830
no js.

02:59.190 --> 03:02.330
As you can see you can just install it NPM install Express.

03:02.340 --> 03:05.100
We'll talk about dash dash save in just a second.

03:05.610 --> 03:07.560
And you can read more about it here.

03:07.560 --> 03:12.280
Basically it provides a robust set of features for web applications.

03:12.360 --> 03:13.670
It's light weight.

03:13.740 --> 03:20.220
So what that means if I go over here to know yes frameworks is a site that I found it has a list of

03:20.280 --> 03:22.200
some of the most popular Noad framework.

03:22.200 --> 03:26.180
There are a ton of them out there because people love using frameworks for good reason.

03:26.190 --> 03:27.880
They help you make things faster.

03:28.290 --> 03:33.350
There's two categories that this person has categorized them into Sinatras like in rails like.

03:33.360 --> 03:35.990
Basically this comes from Ruby.

03:36.300 --> 03:38.910
These are two Ruby frameworks Sinatra and rails rails.

03:38.910 --> 03:39.510
You might have heard of.

03:39.510 --> 03:44.210
It's a bigger framework very popular in Ruby but it controls everything.

03:44.310 --> 03:46.230
It's very strict.

03:46.230 --> 03:50.340
Sinatra is much lighter weight meaning that you have more freedom to make decisions.

03:50.340 --> 03:55.950
It's less opinionated which means that you can configure things how you want but also the advantage

03:55.950 --> 03:58.930
of something like Rails is that you don't have to make decisions.

03:58.980 --> 04:01.210
For example how to structure your files.

04:01.230 --> 04:03.510
Where do I put my CSSA files in Rails.

04:03.510 --> 04:05.840
You don't have a choice in Sinatra you have to decide.

04:06.000 --> 04:09.330
So with that said there are all these frameworks for node.

04:09.390 --> 04:14.460
EXPRESS Is the top one here that we're going to use but there are other ones there's sales and Gedi

04:14.460 --> 04:15.930
or two that I've used.

04:16.090 --> 04:20.440
Khoa I don't know if trench coat or Kellaway is one that's becoming popular now.

04:20.550 --> 04:22.240
A lot of people are using too.

04:22.680 --> 04:27.150
So anyway I'm just trying to point out here that there are a bunch of frameworks just like when I said

04:27.150 --> 04:29.450
we could have used any language to talk to my ass.

04:29.530 --> 04:35.370
Well we could use any node framework to make a web app where it happening to use Express.

04:35.370 --> 04:36.090
OK.

04:36.420 --> 04:40.410
So the first thing I'd recommend here is to look at the documentation for Express.

04:40.500 --> 04:44.610
If you're curious if you haven't taken a course in it you're not familiar with it or you have never

04:44.610 --> 04:45.940
worked with a web framework.

04:45.960 --> 04:50.130
The documentation is pretty straightforward if you click on getting started.

04:50.130 --> 04:51.820
You don't have to go through all of it.

04:52.110 --> 04:54.180
But if we're actually going to do.

04:54.240 --> 05:00.270
Hello world here's a simple app that we'll be making in just a moment but it has a nice can of walk

05:00.350 --> 05:06.930
through using express how you write certain things with syntaxes and then there's a guide that much

05:06.930 --> 05:07.640
more in depth.

05:07.710 --> 05:10.920
And then there's a reference when you click on the API reference.

05:10.920 --> 05:12.620
Make sure you're doing four point x.

05:12.630 --> 05:15.210
The most recent and this is sort of like that.

05:15.270 --> 05:19.860
Think of them I ask you all docs there's all these methods that we see over here and you can read about

05:19.860 --> 05:21.670
them over here.

05:21.780 --> 05:24.990
So we'll be referring back to these docs as we go through the course.

05:25.130 --> 05:27.000
And for now that's where we'll leave off.

05:27.000 --> 05:31.470
All I wanted to do in this video is introduce express tell you that it's a node framework show you the

05:31.470 --> 05:33.030
Web site the documentation.

05:33.030 --> 05:37.290
Then in the next video we're going install it and create our own first application.

05:38.260 --> 05:38.870
First web app.
