Modularizing our code

If you take a look inside the src/index.js file, you'll see that there are three top-level middleware functions—checkEmptyPayloadcheckContentTypeIsSet, and checkContentTypeIsJson—as well as an anonymous error handler function. These are prime candidates that we can extract into their own modules. So, let's get started!