Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
This module provides a helper function to read the command line arguments using the AppConfig type to store them. It also can be used to define other middleware configuration that may be delegated to some sort of external configuration.
Synopsis
- prettyVersion :: Text
- loadConfig :: IO AppConfig
- warpSettings :: (IO () -> IO ()) -> AppConfig -> Settings
- data AppConfig = AppConfig {
- configDatabase :: Text
- configPath :: Maybe Text
- configHost :: Text
- configPort :: Int
- configListenChannel :: Text
- configMetaChannel :: Maybe Text
- configJwtSecret :: ByteString
- configJwtSecretIsBase64 :: Bool
- configPool :: Int
- configRetries :: Int
- configReconnectInterval :: Maybe Int
- configCertificateFile :: Maybe Text
- configKeyFile :: Maybe Text
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
warpSettings :: (IO () -> IO ()) -> AppConfig -> Settings Source #
Given a shutdown handler and an AppConfig builds a Warp Settings to start a stand-alone server
Config file settings for the server