Express Basics Course

Go to class
Write Review

Free Online Course: Express Basics Course provided by Treehouse is a comprehensive online course, which lasts for 4-5 hours worth of material. The course is taught in English and is free of charge.

Overview
  • Learn how to use Express.js to build dynamic websites on the Node.js platform. In the process, you'll learn some fundamental HTTP concepts that you can apply to any other framework!

    What you'll learn

    • Installing and Setting up Express
    • Pug Templating
    • Routing in Express
    • HTTP GET and POST
    • Basic Form Processing
    • Middleware

Syllabus
  • Getting Started with Express

    Build your first Express App from scratch!

    Chevron 9 steps
    • What is Express?

      4:05

    • Install Express

      4:28

    • Review Installing Express

      1 objective

    • Review: Installing Express

      5 questions

    • Creating a Server in Express

      3:23

    • Creating a Route with Express

      6:55

    • Review: Your First Express App

      5 questions

    • Adding Multiple Routes to the App

      4:34

    • Setting Up a Basic Express App

      2 objectives

    Using Templates with Express

    Learn how to serve dynamic web pages easily with Pug, a popular template engine that can be used with Express.

    Chevron 10 steps
    • What is Template Rendering?

      2:35

    • Review: What is Template Rendering

      5 questions

    • What is Pug?

      3:00

    • Using Pug in Your Express App

      4:53

    • Review: Pug Basics

      5 questions

    • Express’s Response.render Method

      7:42

    • Review Response.render

      2 objectives

    • Using Logic in Pug

      6:12

    • Breaking Your Project’s Templates into Partials

      7:29

    • Review: Pug Inheritance & Logic

      5 questions

    Deeper into Routing with Express

    Routing is how users can access different parts of your application. Let's examine how to offer users more from our app.

    Chevron 12 steps
    • POST Requests

      6:26

    • The Request Object

      4:29

    • Review: The Request Object

      5 questions

    • The Response Object

      5:29

    • Review: The Response Object

      5 questions

    • Review Adding Multiple Routes

      2 objectives

    • Statelessness, Setting and Reading Cookies

      9:41

    • Review: Statelessness

      5 questions

    • Redirects

      5:44

    • Challenges: Redirects

      2:37

    • Solution: Clearing Cookies and Redirecting

      1:55

    • Review: Redirects

      5 questions

    Middleware

    Two essential components of Express are routing and middleware. Now that we have a handle on routing, let's see what middleware is all about!

    Chevron 9 steps
    • What is Express Middleware?

      2:22

    • Middleware Sequence and Routing

      5:11

    • Review: Middleware Sequence and Routing

      5 questions

    • The `next` function and a Closer Look at Middleware

      4:45

    • Handling Errors in an Express App

      3:56

    • Review: `next` and Handling Errors

      5 questions

    • Error Handling Middleware

      5:20

    • Handling 404 Errors

      2:34

    • Review: Error Handling and 404s

      5 questions

    Parameters, Query Strings, and Modularizing Routes

    Now that we have a solid grasp on the basics, let's apply that knowledge to developing the Flashcard application.

    Chevron 9 steps
    • Modular Routes

      6:17

    • Using Data and Route Parameters

      6:14

    • Review: Modular Routes and Route Parameters

      5 questions

    • Card Template

      3:52

    • Adding Links

      2:23

    • Review: Card Template and Links

      5 questions

    • Randomize Cards

      2:49

    • Linking Around the Application

      7:59

    • Review

      5 questions

    Serving Static Files in Express

    Web pages need CSS and other assets to look good. Express can supply those with what's called a static server. Let's set one up; it's easy!

    Chevron 4 steps
    • What Are Static Assets?

      2:56

    • Adding Static Assets to the App

      6:00

    • Merging the Design Files

      8:27

    • Course Review

      6 questions