This tutorial walks through the construction of an asynchronous REST API using Vert.x 3, Kotlin and a JDBC backend.
The original exercise was useful because it showed the evolution from a tiny HTTP server to a more realistic REST service:
- Start a simple Vert.x HTTP server.
- Add an in-memory REST user repository.
- Simplify REST definitions with Kotlin.
- Replace the in-memory repository with a JDBC backend.
- Use promises and more Kotlin syntax to make the asynchronous flow easier to read.
The main point was not only “Vert.x can expose REST”. It was that Kotlin made asynchronous Java server code much more pleasant at a time when Vert.x 3 was becoming a practical option for lightweight services.
The complete code for the original tutorial remains available in the repository linked from the Spanish/original post.