Using Express and Express Middleware


Overview/Description
Target Audience
Prerequisites
Expected Duration
Lesson Objectives
Course Number
Expertise Level



Overview/Description
Building on the Express API, this course demonstrates the power of the Express Middleware. In this course, you will learn how to use Middleware to interact with user input, form data, and advanced routing. This course also focuses on the features most web sites require and how Express can facilitate that functionality.

Target Audience
Web developers who are interested in using the Express framework for NodeJS.

Prerequisites
None

Expected Duration (hours)
1.6

Lesson Objectives

Using Express and Express Middleware

  • start the course
  • describe middleware and how it helps Express
  • install the express-validator middleware
  • use the express-validator middleware to do input validation
  • retrieve and use variables passed in on the URL
  • retrieve form data via POST variables
  • use the cookie-parser middleware to set and get cookies
  • use the body-parser middleware to parse and format data using JSON
  • describe session handling with Express
  • configure express-session for use in an express app
  • create a session for a successfully logged-in user
  • check session states and display a simple menu to users who are already logged in
  • create an interface to log out a user and remove the user's session
  • use wildcards in routes to match multiple paths
  • use regular expressions to match paths
  • use app.all and next() to pass control to another route
  • create error-handling methods that respond with HTTP status codes and user-friendly error messages
  • create an Express HTTPS server
  • use HTTP status codes to do URL redirection
  • create and use a web page that allows users to download a file from the server
  • create and use a web page that allows users to send binary data with sendFile
  • use sendStatus() to control the HTTP status code sent to the client
  • create fields or modify field values for the HTTP Header
  • use Express, sessions, and Middleware to create a web app
  • Course Number:
    wd_exjs_a02_it_enus

    Expertise Level
    Intermediate