Starts a Play server using Akka HTTP.
Components for building a simple Akka HTTP Server.
Knows how to create an AkkaHttpServer.
creates a Server implementation based Netty
Cake for building a simple Netty server.
The Netty server provider
A ServerProcess that wraps a real JVM process.
Provides generic server behaviour for Play applications.
Components to create a Server instance.
Common configuration for servers such as NettyServer.
Common configuration for servers such as NettyServer.
The root directory of the server. Used to find default locations of files, log directories, etc.
The HTTP port to use.
The HTTPS port to use.
The socket address to bind to.
The run mode: dev, test or prod.
This exception is thrown when the server is unable to listen on a port
Abstracts a JVM process so it can be mocked for testing or to isolate pseudo-processes within a VM.
Abstracts a JVM process so it can be mocked for testing or to
isolate pseudo-processes within a VM. Code using this class
should use the methods in this class instead of methods like
System.getProperties()
, System.exit()
, etc.
An object that knows how to obtain a server.
An object that knows how to obtain a server. Instantiating a
ServerProvider object should be fast and side-effect free. Any
actual work that a ServerProvider needs to do should be delayed
until the createServer
method is called.
Indicates an issue with starting a server, e.g.
Indicates an issue with starting a server, e.g. a problem reading its configuration.
Creates an AkkaHttpServer from the given router:
Creates an AkkaHttpServer from the given router:
val server = AkkaHttpServer.fromRouter(ServerConfig(port = Some(9002))) { case GET(p"/") => Action { Results.Ok("Hello") } }
Or 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.
Used to start servers in 'dev' mode, a mode where the application is reloaded whenever its source changes.
Create a Netty server from the given router and server config:
Create a Netty server from the given router and server config:
val server = Netty.fromRouter(ServerConfig(port = Some(9002))) { case GET(p"/") => Action { Results.Ok("Hello") } }
Or from a given router using BuiltInComponents:
val server = NettyServer.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.
Used to start servers in 'prod' mode, the mode that is used in production.
Used to start servers in 'prod' mode, the mode that is used in production. The application is loaded and started immediately.
Utilities for creating a server that runs around a block of code.
A ServerProcess that wraps a real JVM process. Calls have a real effect on the JVM, e.g.
exit
callsSystem.exit.