In this a basic Middleware function is created. Middleware functions are used to add the functionalities to the EXPRESS Application.
IMPORTANT POINTS TO NOTE:
- Whenever a request arrives to the server, first of all it goes to the middleware functions and then to the handlers.
- Order of middleware does matter.
- Using next() after each middleware is also important so that your server can go to the next function.