Skip to content

Instantly share code, notes, and snippets.

@chrissie1
Created October 1, 2013 18:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save chrissie1/6782568 to your computer and use it in GitHub Desktop.
Save chrissie1/6782568 to your computer and use it in GitHub Desktop.
package be.baes
import org.wasabi.app.AppServer
import org.wasabi.app.AppConfiguration
import org.wasabi.interceptors.parseContentNegotiationHeaders
fun main(args: Array<String>) {
val config = AppConfiguration(4000, "This is me on port 4000", true)
val server = AppServer(config)
server.parseContentNegotiationHeaders() {
onQueryParameter()
onExtension()
onAcceptHeader()
}
// insert routes here
var person = Person()
person.firstName = "test"
person.lastName = "test2"
server.get("/", { response.send (person) })
server.start()
}
class Person()
{
public var lastName : String = ""
public var firstName : String = ""
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment