Skip to content

Instantly share code, notes, and snippets.

@xuwei-k
Last active February 20, 2016 13:14
Show Gist options
  • Star 9 You must be signed in to star a gist
  • Fork 3 You must be signed in to fork a gist
  • Save xuwei-k/422365f271b12603d33c to your computer and use it in GitHub Desktop.
Save xuwei-k/422365f271b12603d33c to your computer and use it in GitHub Desktop.
came back play mini!
#!/usr/bin/env scalas
/***
scalaVersion := "2.11.7"
libraryDependencies += "com.typesafe.play" %% "play-netty-server" % "2.4.6"
*/
import play.core.server._
import play.api.routing.sird._
import play.api.mvc._
val server = NettyServer.fromRouter(ServerConfig(
mode = play.api.Mode.Test
)) {
case GET(p"/hello/$to") => Action {
Results.Ok(s"Hello $to")
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment