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

Mounting subapplications


Each Express application is a middleware on its own, so it can be mounted into another application. This feature makes it easy to plug subapplications into a parent one. Possible use cases include the following points:

  • Creating applications in a modular way, where each subapplication is totally independent of the others and possibly developed by other team members

  • Adding a blogging platform or a forum to an endpoint

  • Integrating third-party tools such as a monitoring dashboard or an FTP client along with a text editor

There are two possible approaches we can take when working with mountable applications: either the main application deals with crosscutting concerns such as logging and error handling, or the subapplications handle these things on their own. If we require third-party applications, we might not be able to control some of these aspects, but if we are creating a modular web application from scratch, then it's our choice to begin with.

Next, we will create an...