Search⌘ K
AI Features

Routing in Vert.x

Explore how to add and manage HTTP routes in Vert.x using Kotlin. Understand creating basic endpoints, returning status messages, and responding with JSON to build reactive microservices efficiently.

Adding a basic endpoint

Notice that no matter which URL we specify, we always get the same result. Of course, that’s not what we want to achieve. Let’s start by adding the most basic endpoint, which will only tell us that the service is up and running.

For that, we’ll use Router in our App.kt file:

 ...