Getting started with Ktor
You might be weary of developing commonplace applications like to-do or shopping lists.
Thus, in this chapter, we will design a microservice for a cat shelter. The microservice will have capabilities to:
- Offer an endpoint to verify the service’s operational status.
- Display a list of cats currently residing in the shelter.
- Enable the addition of new cats.
- Update cat information.
- Remove a cat added by mistake from the registry.
For this project, we will utilize Ktor, a concurrent framework developed and maintained by the creators of the Kotlin programming language.
The easiest way to create a Ktor application nowadays is by going to https://start.ktor.io and generating a new project.
Figure 11.1: Project generation on start.ktor.io
For the moment, exclude all additional plugins; we will introduce them gradually later, explaining the purpose of each.
After downloading the resulting...