Safe HaskellNone

IHP.FrameworkConfig

Synopsis

Documentation

class FrameworkConfig where Source #

Minimal complete definition

appHostname, environment

Methods

appHostname :: Text Source #

environment :: Environment Source #

appPort :: Int Source #

baseUrl :: Text Source #

requestLoggerMiddleware :: Middleware 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.

See https://hackage.haskell.org/package/wai-extra-3.0.29.2/docs/Network-Wai-Middleware-RequestLogger.html

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

sessionCookie :: SetCookie 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)) }

mailServer :: MailServer Source #

dbPoolIdleTime :: NominalDiffTime Source #

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

dbPoolMaxConnections :: Int Source #

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

defaultIHPSessionCookie :: FrameworkConfig => SetCookie Source #

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

data RootApplication Source #

Constructors

RootApplication 

Instances

Instances details
Eq RootApplication Source # 
Instance details

Defined in IHP.FrameworkConfig

Show RootApplication Source # 
Instance details

Defined in IHP.FrameworkConfig

findLibDirectory :: IO Text Source #

Finds the lib

The location depends on whether the framework is installed through nix or checked out from git inside the current project directory.

When it's installed with nix, the lib dir is located at lib/ihp while the dev server binary is located at bin/RunDevServer.