Safe HaskellNone




newtype AppHostname Source #


AppHostname Text 

newtype AppPort Source #


AppPort Int 

newtype BaseUrl Source #


BaseUrl Text 

newtype RequestLoggerMiddleware Source #

Provides IHP with a middleware to log requests and responses.

By default this uses the RequestLogger middleware from wai-extra. Take a look at the wai-extra documentation when you want to customize the request logging.


Set requestLoggerMiddleware = application -> application to disable request logging.


RequestLoggerMiddleware Middleware 

newtype SessionCookie Source #

Provides the default settings for the session cookie.

  • Max Age: 30 days
  • Same Site Policy: Lax
  • HttpOnly (no access through JS)
  • secure, when baseUrl is a https url

Override this to set e.g. a custom max age or change the default same site policy.

Example: Set max age to 90 days > sessionCookie = defaultIHPSessionCookie { Cookie.setCookieMaxAge = Just (fromIntegral (60 * 60 * 24 * 90)) }


SessionCookie SetCookie 

newtype DBPoolIdleTime Source #

How long db connection are kept alive inside the connecton pool when they're idle

newtype DBPoolMaxConnections Source #

Max number of db connections the connection pool can open to the database

type ConfigBuilder = StateT TMap IO () Source #

newtype ExceptionTracker Source #

Interface for exception tracking services such as sentry




option :: forall option. Typeable option => option -> StateT TMap IO () Source #

Puts an option into the current configuration

In case an option already exists with the same type, it will not be overriden:

option Production
option Development
findOption @Environment

This code will return Production as the second call to option is ignored to not override the existing option.

findOption :: forall option. Typeable option => StateT TMap IO option Source #

data FrameworkConfig Source #




fromConfig :: (?context :: context, ConfigProvider context) => (FrameworkConfig -> a) -> a Source #

Proxies FrameworkConfig fields contained in some context that can provider a FrameworkConfig

getConfig :: (?context :: context, ConfigProvider context) => FrameworkConfig Source #

Get the current frameworkConfig

defaultIHPSessionCookie :: Text -> SetCookie Source #

Returns the default IHP session cookie configuration. Useful when you want to override the default settings in $sel:sessionCookie:FrameworkConfig

data RootApplication Source #




Instances details
Eq RootApplication Source # 
Instance details

Defined in IHP.FrameworkConfig

Show RootApplication Source # 
Instance details

Defined in IHP.FrameworkConfig

isEnvironment :: (?context :: context, ConfigProvider context) => Environment -> Bool Source #

isDevelopment :: (?context :: context, ConfigProvider context) => Bool Source #

Returns True when the application is running in Development mode

Development mode means that the Development option is configured in Config/Config.hs

isProduction :: (?context :: context, ConfigProvider context) => Bool Source #

Returns True when the application is running in Production mode

Production mode means that the Production option is configured in Config/Config.hs