For several episodes now, the discussion has revolved around Routers and organizing your code. All the while, routers have continued to be talked about in terms of middleware. But what is middleware? Why should you care about it, and how can it really help you build your Express applications?
In this episode, I'll take a step back and introduce some of the basic pieces of middleware that are included in Express, show you how you can write your own middleware functions, and see a few things that middleware can do for us.
You may not realize this, but nearly everything you do in Express is already middleware. Understanding this and taking advantage of the power and flexibility in middleware is a key component to really unlocking the potential of Express. So don't take this episode lightly, even if the content does appear to be a bit more simple than previous episodes. Mastering this powerful tool is well worth your time and effort.