Starts a Play server using Akka HTTP.
Components for building a simple Akka HTTP Server.
Knows how to create an AkkaHttpServer.
A convenient helper trait for constructing an AkkaHttpServer, for example:
Creates an AkkaHttpServer from a given router using BuiltInComponents:
Creates an AkkaHttpServer from a given router using BuiltInComponents:
val server = AkkaHttpServer.fromRouterWithComponents(ServerConfig(port = Some(9002))) { components => import play.api.mvc.Results._ import components.{ defaultActionBuilder => Action } { case GET(p"/") => Action { Ok("Hello") } } }
Use this together with Sird Router.
A convenient helper trait for constructing an AkkaHttpServer, for example: