Topics Covered

Duration: 80 minutes


Learning Objectives

  1. Install and set up Express.js.

  2. Create routes and handlers for HTTP methods.

  3. Understand middleware and its use cases.


Topic Outline (30-min)

  1. Introduction to Express:

    • Installing and setting up.

    • Basic structure of an Express app.

  2. Routing in Express:

    • Defining GET, POST, PUT, DELETE routes.

    • Route parameters and query strings.

  3. Middleware in Express:

    • Built-in middleware.

    • Custom middleware.


Student Activity (30-min)

Activity: Building a Basic Express Application


Homework/Practice Coding Assignment (20-min)

Task: Extend the application to:

  1. Include middleware for logging requests.

  2. Handle errors using a custom error handler.

Last updated