Book Image

Mastering Web Application Development with Express

By : Alexandru Vladutu
Book Image

Mastering Web Application Development with Express

By: Alexandru Vladutu

Overview of this book

Table of Contents (18 chapters)
Mastering Web Application Development with Express
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Chapter 2. Component Modularity Using Middleware

In this chapter, we will look at the middleware system used by Express and see how it enables us to create modular web applications. This chapter will cover the following topics:

  • How the middleware system works

  • Creating configurable middleware

  • Differences between the router and the middleware system

  • Why loading middleware in order matters

  • Handling errors using middleware

  • Mounting subapplications with Express

  • Creating a middleware system similar to the one used in Express