The next step in the API design-first approach is to build the Media Catalogue Microservice. This follows from the Design and Try phases as explained in Chapter 3, Designing the API. The aim of the Design and Try phases is to design and test the API, using Apiary, repeatedly until the API Blueprint is approved between the client and API designer. The API Blueprint is then used as a starting point to build the microservice:
The built, test, and validation of the Media Catalogue Microservice is explained in the following steps:
- Install Node.js and MongoDB
- Create the skeleton of the Media Catalogue Microservice
- Define the structure of the Media Catalogue Microservice
- Configure the Media Catalogue Microservice
- Define the data entity
- Code the interaction with the database
- Define the controller function
- Route the incoming request to the new controller function...