kawaii-0.0.1.0: Utilities for serving static sites and blogs with Wai/Warp

Copyright(c) Eduardo Trujillo, 2016
LicenseApache
Stabilityexperimental
Safe HaskellNone
LanguageHaskell2010

Network.Wai.Serve.Types

Contents

Description

Types used by the Kawaii package.

Synopsis

Middleware Stack

data MiddlewareStack Source #

A middleware stack is a simple container of Wai middleware. The top of the stack is considered to be the outermost layer of middleware while the bottom of the stack is the innermost layer of middleware.

The stack is a Monoid, so it can be combined with other stacks using <>, and an empty one can be obtained using mempty.

Constructors

MiddlewareStack [Middleware]

The constructor takes a list of middleware, where the left-most item in the list will end up at the top of the stack, and the right-most at the bottom.

Server configuration

data ServeConfiguration Source #

The configuration for the server process.

The different transforms can be used to specify how the configuration changes depending on the stage. While starting up, the server process will take the base configuration, check the stage and pass the configuration through the appropriate transformer.

Constructors

ServeConfiguration 

Fields

data TLSConfiguration Source #

The configuration for the TLS/HTTPS server.

Constructors

TLSConfiguration 

Fields

CSP

Miscellaneous types

data Stage Source #

The development stage an application is executing in.

This is used to alter the behavior of the server depending on the stage of development. For example, a local development server might only have an HTTP listener and a smaller middleware stack, while a production server also listens for TLS connections and has additional middlewares that only make sense on a public server.

Instances

Lenses