Hey, welcome back.
Very high energy, because we're moving on to a very exciting portion of the course we've now seen how
to take database and my SQL, everything we know and combine it with a node file, a single file that
doesn't do I mean, it depends on your impression of it.
It doesn't do a whole lot, just inserts, but it inserts 500 things, which is pretty cool and they're
all randomly generated.
But that's not an application that's still useful for our application.
We'll be able to use that.
Just to recap, the whole reason we're doing that is so that when we start up our application, we have
some data in there, we have something to work with rather than totally empty database or something
that has two users.
We have 500 realistic randomly generated emails and created at dates.
Okay.
So we've done that.
We have that.
Now we're moving on to the web application portion.
So remember this is join us our mailing app or waitlist app where there's a nice page with it looks
styled.
It's nice it says join us in big letters.
It says How many users have currently joined?
And there's also a guarantee, 100%.
It's not a cult.
And then there's a form at the bottom where you can actually enter your email to join the list.
So we have to get there.
We're going to start with the basics of a web app.
So just like we had to start with the basics of Node, we're now starting with the basics of building
web applications.
Okay.
That brings us to something called Express.
So if you've taken my other course or if you're familiar with Node and you've used it in any web development
capacity, you've probably come across the Framework Express.
It's a web development framework.
It helps us make applications faster.
So if you're not familiar with frameworks in 10 seconds, what they are are tools, libraries that are
a bit more complex, bit more controlling of how you write your code.
They dictate things for you.
You play by the rules, but they help you make things faster.
So a web development framework helps you make websites faster.
There are iOS or game development frameworks that help you make games faster, so they kind of limit
your freedom a bit, but they empower you because they speed you up and they let it.
They let you focus on the things that matter.
So with all that said, Express is very simple, a lightweight framework.
What it allows us to do is once we install it and include it in a file, we can very quickly make a
web application.
So something like Faker is a package that allows us to quickly get random data, a very small kind of
feature that's it's useful, but it's a small thing.
Express is a package that when you use it and install it, it does a lot.
It sets up a server for you.
It listens for incoming requests.
It figures out how to respond to requests.
It handles HTML, CSS in responding with that, it figures out how to parse a response body.
All these things will go into, but it does a lot.
So let's take a look very quickly at the documentation.
Express is a fast, opinionated, minimalist web framework for Node.js.
As you can see, you can just install it and PM install express.
We'll talk about Dash Dash Save in just a second and you can read more about it here.
Basically, it provides a robust set of features for web applications.
It's lightweight.
So what that means, if I go over here to Node.js Frameworks is a site that I found.
It has a list of some of the most popular node framework.
There are a ton of them out there because people love using frameworks for good reason.
They help you make things faster.
There's two categories that this person has categorized them into Sinatra like and rails like.
Basically, this comes from Ruby.
These are two Ruby frameworks, Sinatra and Rails.
Rails you might have heard of.
It's a bigger framework, very popular in Ruby, but it controls everything.
It's very strict.
Sinatra is much lighter weight, meaning that you have more freedom to make decisions.
It's less opinionated, which means that you can configure things how you want.
But also the advantage of something like Rails is that you don't have to make decisions.
For example, how to structure your files.
Where do I put my CSS files in rails?
You don't have a choice.
And Sinatra, you have to decide.
So with that said, there are all of these frameworks for Node Express is the top one here that we're
going to use.
But there are other ones.
There's Sales and Getty are two that I've used COA.
I don't know if it's pronounced KOA or KOA, it's one that's becoming popular now.
A lot of people are using too.
So anyways, I'm just trying to point out here that there are a bunch of frameworks, just like when
I said we could have used any language to talk to my SQL, we could use any node framework to make a
web app.
We're happening to use Express OC.
So the first thing I recommend here is to look at the documentation for Express.
If you're curious, if you haven't taken a course in it, you're not familiar with it or you have never
worked with a web framework.
The documentation is pretty straightforward.
If you click on getting started, you don't have to go through all of it.
But if we actually go to do like a Hello World, here's a simple app that will be making in just a moment.
But it has a nice kind of.
Walk through of using express how you write certain things, what the syntax is, and then there's a
guide that's much more in depth, and then there's a reference.
When you click on API reference, make sure you're doing for point X, the most recent and this is sort
of like the think of the My SQL Docs, there's all these methods that we see over here and you can read
about them over here.
So we'll be referring back to these docs as we go through the course.
And for now, that's where we'll leave off.
All I wanted to do in this video was Introduce Express, tell you that it's a node framework, show
you the website, the documentation.
Then in the next video, we're going to install it and create our own first application.
First Web app.