snap-server-0.9.4.6: A fast, iteratee-based, epoll-enabled web server for the Snap Framework

Safe Haskell | None
Language | Haskell98

Snap.Http.Server

Description

The Snap HTTP server is a high performance, epoll-enabled, iteratee-based web server library written in Haskell. Together with the `snap-core` library upon which it depends, it provides a clean and efficient Haskell programming interface to the HTTP protocol.

Synopsis

- simpleHttpServe :: MonadSnap m => Config m a -> Snap () -> IO ()
- httpServe :: Config Snap a -> Snap () -> IO ()
- quickHttpServe :: Snap () -> IO ()
- snapServerVersion :: ByteString
- setUnicodeLocale :: String -> IO ()
- module Snap.Http.Server.Config

# Documentation

simpleHttpServe :: MonadSnap m => Config m a -> Snap () -> IO ()

Starts serving HTTP requests using the given handler. This function never returns; to shut down the HTTP server, kill the controlling thread.

This function is like `httpServe` except it doesn't setup compression, reverse proxy address translation (via `behindProxy`), or the error handler; this allows it to be used from `MonadSnap`.

httpServe :: Config Snap a -> Snap () -> IO ()

Starts serving HTTP requests using the given handler, with settings from the `Config` passed in. This function never returns; to shut down the HTTP server, kill the controlling thread.

quickHttpServe :: Snap () -> IO ()

Starts serving HTTP using the given handler. The configuration is read from the options given on the command-line, as returned by `commandLineConfig`. This function never returns; to shut down the HTTP server, kill the controlling thread.

snapServerVersion :: ByteString

A short string describing the Snap server version

setUnicodeLocale :: String -> IO ()

Given a string like "en_US", this sets the locale to "en_US.UTF-8". This doesn't work on Windows.

module Snap.Http.Server.Config