Create a NodeJS API with Koa and TypeScript - #7 - Building Out An Endpoint With TDD

2K views Feb 14, 2023

We've laid all the groundwork. Now let's use our foundation and build out an endpoint with more functionality. We're going to allow our API consumers to POST in data. That data needs to be validated. If the validation process fails, we will return a nice, helpful message telling the consumer exactly how their request failed. If the submitted data passes the validation process, we will save that data off to our persistent storage, which in our case will be Redis. Let's start by defining the test / specification of exactly what a happy path POST request looks like.

#Mobile & Wireless
  # Web Services