Middleware is a very important topic in Express.js because most things we do in Express are via middleware, including route handling.
In this lesson we:
- implement auth and role middleware
- protect router with middleware
- understand the use of the "next" parameter/function
- apply middleware to a group of routes or globally
- and MORE!
The helper function used in this lesson: https://github.com/ZestArinze/express...