Spock-0.14.0.1: Another Haskell web framework for rapid development
Safe HaskellNone
LanguageHaskell2010

Web.Spock.Config

Synopsis

Documentation

data SpockCfg conn sess st Source #

Spock configuration, use defaultSpockCfg and change single values if needed

Constructors

SpockCfg 

Fields

defaultSpockCfg :: sess -> PoolOrConn conn -> st -> IO (SpockCfg conn sess st) Source #

Spock configuration with reasonable defaults such as a basic error page and 5MB request body limit. IMPORTANT: CSRF Protection is turned off by default for now to not break any existing Spock applications. Consider turning it on manually as it will become the default in the future.

Database

data PoolOrConn a where Source #

You can feed Spock with either a connection pool, or instructions on how to build a connection pool. See ConnBuilder

Constructors

PCPool :: Pool a -> PoolOrConn a 
PCConn :: ConnBuilder a -> PoolOrConn a 
PCNoDatabase :: PoolOrConn () 

data ConnBuilder a Source #

The ConnBuilder instructs Spock how to create or close a database connection.

Constructors

ConnBuilder 

data PoolCfg Source #

If Spock should take care of connection pooling, you need to configure it depending on what you need.

Sessions

defaultSessionCfg :: a -> IO (SessionCfg conn a st) Source #

Session configuration with reasonable defaults and an stm based session store

data SessionCfg conn a st Source #

Configuration for the session manager

Constructors

SessionCfg 

Fields

data SessionHooks a Source #

Hook into the session manager to trigger custom behavior

Constructors

SessionHooks 

Fields

data SessionStore sess tx Source #

Constructors

SessionStore 

Fields

data SessionStoreInstance sess where Source #

Constructors

SessionStoreInstance :: forall sess tx. (Monad tx, Functor tx, Applicative tx) => SessionStore sess tx -> SessionStoreInstance sess