/Lecture_Node-API3

Primary LanguageJavaScriptOtherNOASSERTION

Express Middleware

Guided project for Node API 3 module.

In this project we will learn how to create a very simple Web API using Node.js and Express, and learn to use and create Express Middleware.

Prerequisites

Project Setup

  • fork and clone this repository.
  • CD into the folder where you cloned the your fork.
  • type npm install to download dependencies.

Please follow along as the instructor creates and adds middleware to the API step by step.

Lecture Notes

Four types of middleware

  • Built-in middleware: functions that come with Express
  • Third-party middleware: functions that we install through NPM
  • Custom middleware: functions that we write ourselves
  • Error middleware: functions that catch errors in the middleware stack