| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
WebGear.Server
Description
Main module for WebGear server.
Import this module to get all required types and functions to build a
WebGear server. Alternatively, import individual modules under
WebGear.Server.
Typical usage to implement a server is:
import WebGear.Server import Network.Wai (Application) import qualified Network.Wai.Handler.Warp as Warp -- | A monad stack for you application type App a = .... -- | Convert the App monad to IO runApp :: App a -> IO a runApp = .... -- | Handler for the server myHandler ::Handlerh App =>RequestHandlerh '[] myHandler = .... app :: Application app =toApplication(transformrunApp myHandler) main :: IO () main = Warp.run port app