Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
These are all function necessary to configure and start the server.
Synopsis
- prettyVersion :: Text
- loadConfig :: IO AppConfig
- serve :: AppConfig -> IO ()
- postgresWsMiddleware :: Context -> Middleware
Documentation
prettyVersion :: Text Source #
User friendly version number
loadConfig :: IO AppConfig Source #
Load all postgres-websockets config from Environment variables. This can be used to use just the middleware or to feed into warpSettings
serve :: AppConfig -> IO () Source #
Start a stand-alone warp server using the parameters from AppConfig and a opening a database connection pool.
postgresWsMiddleware :: Context -> Middleware Source #
Given a secret, a function to fetch the system time, a Hasql Pool and a Multiplexer this will give you a WAI middleware.