Safe Haskell | Safe-Inferred |
---|---|
Language | GHC2021 |
Converts mig server to WAI-application.
Synopsis
- data ServerConfig = ServerConfig {}
- data FindRouteType
- type Kilobytes = Int
- toApplication :: ServerConfig -> Server IO -> Application
Documentation
data ServerConfig Source #
Server config
ServerConfig | |
|
Instances
Default ServerConfig Source # | |
Defined in Mig.Server.Wai def :: ServerConfig # |
data FindRouteType Source #
Algorithm to find route handlers by path
TreeFinder | converts api to tree-like structure (prefer it for servers with many routes) |
PlainFinder | no optimization (prefer it for small servers) |
toApplication :: ServerConfig -> Server IO -> Application Source #
Converts mig server to WAI-application.
Note that only IO-based servers are supported. To use custom monad
we can use hoistServer
function which renders monad to IO based or
the class HasServer
which defines such transformatio for several useful cases.