In this tutorial, we will be using a demo project to develop a small facade for a system that consists of a few microservice:
The Beacons microservice was demonstrated in the Data Microservice tutorial. The rest of the microservices are from our free Pip.Services Library.
The architecture of the system looks like this:
The facade microservice will be responsible for:
Before starting, be sure to set up your environment and create a folder for the project. The directory structure of facade projects differs a bit from the structure we use when developing data microservices.
Create a package.json file at the root of the project with the following content to configure dependencies and project parameters:
/package.json
Install all necessary modules using the command:
Create a TypeScript compiler configuration file with the following lines:
/tsconfig.json
Now our project is ready for development. Continue on to Step 2 - Business operations to start implementing the facade itself.