Structuring code through Nanoservices
We can now begin our journey of building a web application. In the rest of this chapter, we will not touch a web framework or build an HTTP listener. This will happen in the next chapter. However, we will construct a to-do module that will interact with a JSON file. It is going to be structured in such a way that it can be inserted into any web application that we build with minimal effort. This to-do module will enable us to create, update, and delete to-do items. We will then interact with this via the command line. The process here is to explore how to build well-structured code that will scale and be flexible. To gain an understanding of this, we will break down the building of this module into the following chunks:
- Building to-do structs
- Managing structs with an API
- Storing tasks with our data access layer using a JSON file (we will replace this with a proper database in later chapters).
Before we start tackling these steps, we are going to...