This chapter has provided us with a great deal of information about middleware. We can now create middleware components and even our custom framework that replicates Express up to a certain point. We have discussed the similarities between the router and the middleware system. We have seen the advantages of error-handling middleware and also learned how to set up the 404
page. An important insight we got was the fact that each Express application is a middleware of its own, so we can mount the subapplication into a master one.
Now that we know how to use middleware to our advantage, it is time to create a RESTful application with Express.