Skip to content

Latest commit

 

History

History
56 lines (43 loc) · 1.42 KB

README.md

File metadata and controls

56 lines (43 loc) · 1.42 KB

Chat at https://gitter.im/javalin-io/general

Javalin - A Simple REST API Library for Java/Kotlin

The project webpage is javalin.io.

Java quickstart

Add dependency (maven)

<dependency>
    <groupId>io.javalin</groupId>
    <artifactId>javalin</artifactId>
    <version>0.5.2</version>
</dependency>

Start programming:

import io.javalin.Javalin;

public class HelloWorld {
    public static void main(String[] args) {
        Javalin app = Javalin.start(7000);
        app.get("/", ctx -> ctx.result("Hello World"));
    }
}

Kotlin quickstart

Add dependency (gradle)

compile 'io.javalin:javalin:0.5.2'

Start programming

import io.javalin.Javalin

fun main(args: Array<String>) {
    val app = Javalin.start(7000)
    app.get("/") { ctx -> ctx.result("Hello World") }
}

Special thanks