Project Logo

Blacksheep

A micro web framework that doesn't follow the flock

Build Img Coverage Img Download Img Kanban Img

Star Watch Fork Issue

Add the dependency

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

Gradle

dependencies {
    compile ('co.there4.blacksheep:blacksheep:0.0.2') { transitive = false }
    // Import the backend you are going to use
    compile 'io.undertow:undertow-servlet:1.3.19.Final'
}

Maven

<dependency>
    <groupId>co.there4.blacksheep</groupId>
    <artifactId>blacksheep</artifactId>
    <version>0.0.2</version>
</dependency>

Write the code

import co.there4.blacksheep.http.*

fun main(args: Array) {
    get("/hello") { ok("Hello World!") }
    run()
}

Ignite and view at

http://localhost:4321/hello