HORIZON HASKELLDocslts/ghc-10.0.x8fef28d2026-11-02Search packagesCtrl K
Theme: |

GHC 10.0.0.20260917 · lts/ghc-10.0.x · 8fef28d · 2026-11-02

Modulesnap-server-1.1.2.1Haskell2010

Snap.Http.Server

The Snap HTTP server is a high performance 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
valuesimpleHttpServe :: 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.

valuehttpServe :: 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.

valuequickHttpServe :: 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.