Safe Haskell | None |
---|
- defaultMainTLS :: (Show env, Read env) => FilePath -> FilePath -> IO (AppConfig env extra) -> (AppConfig env extra -> IO Application) -> IO ()
- defaultMainLogTLS :: (Show env, Read env) => FilePath -> FilePath -> IO (AppConfig env extra) -> (AppConfig env extra -> IO (Application, LogFunc)) -> IO ()
- type LogFunc = Loc -> LogSource -> LogLevel -> LogStr -> IO ()
Documentation
defaultMainTLS :: (Show env, Read env) => FilePath -> FilePath -> IO (AppConfig env extra) -> (AppConfig env extra -> IO Application) -> IO ()Source
Run your app, taking environment, port, and TLS settings from the commandline.
helps parse a custom configuration
fromArgs
main :: IO () main = cert key defaultMain (fromArgs parseExtra) makeApplication
defaultMainLogTLS :: (Show env, Read env) => FilePath -> FilePath -> IO (AppConfig env extra) -> (AppConfig env extra -> IO (Application, LogFunc)) -> IO ()Source
Same as defaultMain
, but gets a logging function back as well as an
Application
to install Warp exception handlers.