Created
October 1, 2013 18:08
-
-
Save chrissie1/6782568 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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