Skip to content

Commit

Permalink
create and start
Browse files Browse the repository at this point in the history
  • Loading branch information
tipsy committed Dec 6, 2023
1 parent a8e2c50 commit c6f5877
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions pages/docs/migration-guide-5-6.md
Original file line number Diff line number Diff line change
Expand Up @@ -172,18 +172,18 @@ app.routes {

In Javalin 6:
{% capture java %}
var app = Javalin.create(config -> {
var app = Javalin.createAndStart(config -> {
config.router.apiBuilder(() -> {
get("/hello", ctx -> ctx.result("Hello World"));
});
}).start();
});
{% endcapture %}
{% capture kotlin %}
val app = Javalin.create { config ->
val app = Javalin.createAndStart { config ->
config.router.apiBuilder {
get("/hello") { ctx -> ctx.result("Hello World") }
}
}.start()
}
{% endcapture %}
{% include macros/docsSnippet.html java=java kotlin=kotlin %}

Expand Down

0 comments on commit c6f5877

Please sign in to comment.