Is it necessry to use morgan and what is it's purpose?


Is it necessary to use morgan and what is its purpose?


We got first introduced to morgan in this lesson, there we learned the basic idea behind it which is to log useful information regarding the HTTP (HyperText Transfer Protocol) request, that log depending on how we set up morgan can have the status code, the url from where the request comes from, and the response that will be sent back, if configured beyond the 'tiny' string value, we could also see the ip address where the request is coming from, the HTTP version, and the response time.

It is not necessary to implement morgan in our applications, but it certainly is helpful to make sure that the request and response paths work properly and sometimes we will like to use the information received by morgan to either safe or compare for security or cookies which are commonly used to store information that we want to keep constant to not have to ask for it over and over.