Created
February 5, 2012 20:23
-
-
Save afternoon/1747777 to your computer and use it in GitHub Desktop.
Unfiltered Hello World
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
import unfiltered.filter._ | |
import unfiltered.request._ | |
import unfiltered.response._ | |
class HelloWorldApp extends Plan { | |
def intent = { | |
case GET(Path("/")) => | |
PlainTextContent ~> ResponseString("Hello, world!") | |
} | |
} | |
object Server { | |
def main(args: Array[String]) { | |
unfiltered.jetty.Http.local(8080).filter(new HelloWorldApp).run | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment