Microservice predevelopment aspects
In this section, we are going to look at some common development aspects that we will follow throughout the book. We will understand some common aspects, such as which HTTP message code to use, how to set up logging, which kinds of logging to keep, how to use PM2 options, and how to trace a request or attach a unique identifier to a microservice. So, let's get started.
HTTP code
HTTP code dominates standard API communication and are one of the general standards across any general-purpose API. It resolves common issues for any request that is made to the server, whether it is successful, whether it is producing a server error, and so on. HTTP resolves every single request with HTTP code with ranges that indicate the nature of the code. HTTP codes are standards (http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html) based on various code and response actions are taken accordingly, so the concept of not reinventing the wheel essentially applies here. In this...