Skip to content

Creating Levtus

Levtus have one single entry point: Levtus instance. In this section, you will learn how to create a new Levtus instance.

You just need to create an entrance first:

Edit your Main.java to look like this:

import io.github.bernardusz.levtus.Levtus;
void main(){
Levtus app = Levtus.create();
app.get("/hello", ctx -> {
ctx.text("Hello from Levtus Engine!");
});
app.listen(8080);
}

You can set most of Levtus’ configuration via the app. But that is for later, feel free to explore, but for now, we’ll continue forward.