Hands-on account microservice development
To start from scratch, let’s create a folder called src
. We plan to organize our main application structure under this folder. This is going to be a data-centric application, so it’s better to start development from the database segment.
In the end, we plan to build the following project structure for our application:
Figure 5.3: The final project structure
To follow along with ease, don’t forget to download the source code from our repository.
Implementing our data-access functionalities
We always store data somewhere. The most used storage for data is a database. The data access that we plan to implement relies on MongoDB and isolates us from the difficulties of querying a database using SQL. It’s like using arrays or lists but under the hood, it interacts with a database.
To start creating our account microservice, do the following:
Create a db
folder under src
.