Project Logo

Sabina

A Sinatra inspired micro web framework for quickly creating web applications in Java with minimal effort

Build Img Coverage Img

Star Fork Issue

Add the dependency

First, you need to set up the JCenter repository . Then you can add the dependency:

Gradle

dependencies {
    compile ('sabina:http:null') { transitive = false }
    // Import the backend you are going to use
    compile 'io.undertow:undertow-servlet:1.2.8.Final'
}

Maven

<dependency>
    <groupId>sabina</groupId>
    <artifactId>http</artifactId>
    <version>null</version>
</dependency>

Write the code

import static sabina.Sabina.*;

public class HiWorld {
    public static void main (String[] args) {
        get("/hello", it -> "Hi World!").start ();
    }
}

Ignite and view at

http://localhost:4567/hello