Skip to content

Instantly share code, notes, and snippets.

@jugyo
Created August 8, 2011 03:40
Show Gist options
  • Save jugyo/1131168 to your computer and use it in GitHub Desktop.
Save jugyo/1131168 to your computer and use it in GitHub Desktop.
unfiltered-netty example
#!/usr/bin/env sbts
!#
// You can install the sbts by conscript: cs jugyo/sbts
/***
libraryDependencies ++= Seq(
"net.databinder" %% "unfiltered-netty" % "0.4.1"
)
*/
import unfiltered.request._
import unfiltered.response._
/** unfiltered plan */
class App extends unfiltered.netty.cycle.Plan {
def intent = {
case GET(Path(p)) => Html(
<html>
<body>
<p>foo</p>
</body>
</html>
)
}
}
/** embedded server */
unfiltered.netty.Http(8080).handler(new App).run
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment