yesod-tls-1.4.1: Provides main functions using warp-tls for yesod projects

Safe HaskellNone

Yesod.Default.MainTLS

Synopsis

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.

fromArgs helps parse a custom configuration

 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.

type LogFunc = Loc -> LogSource -> LogLevel -> LogStr -> IO ()