- Overview
- Transcript
1.2 How to Install Express 4
1.Learning the Basics of Express6 lessons, 33:03
1.1Introduction01:09
1.2How to Install Express 401:11
1.3Your First Express Application04:09
1.4Views and Templates07:37
1.5The Verb Methods09:10
1.6Application Settings09:47
2.Understanding Request Flow in Express4 lessons, 20:09
2.1Middleware and Request Flow06:25
2.2Custom Middleware Based on Route Parameters04:59
2.3Grouping Routes with app.route02:46
2.4Router Objects05:59
3.Request and Response Objects3 lessons, 11:11
3.1Request Object04:13
3.2Response Object04:15
3.3Formatting Requests02:43
4.Conclusion1 lesson, 01:35
4.1Conclusion01:35
1.2 How to Install Express 4
So let's go ahead and install Express. As I mentioned, the Express framework is built to work on top of Node.JS. So you'll want to have Node.JS installed. You can go over to www.nodejs.org and click this big green Install button here. And you'll get a download for the latest version of Node for your operating system, Windows, Mac, or Linux. I already have Node installed, and if we come over here to the terminal, you can see that if I run node --version. Now, when you install Node, you don't get Node by itself, you also get NPM, which is the Node Package Manager. And this is how we get Express. On my desktop here, I'm going to go ahead and make a directory that I'll just call expressApp. We'll cd into that directory, and now I can do npm install express, and this is how we can download the express node package. This should just take a second. And now, as you can see, we have Express installed. If I go ahead and list all the files and folders in this directory, you can see we have node modules. And if I list the node modules directory, there you go. You can see the express folder inside that directory. So now we know that we have express installed, and we're ready to go ahead and learn all about Express. So in the next screen cast we are going to build our very first Express application.







