warp-0.3.2: A fast, light-weight web server for WAI applications.




A fast, light-weight HTTP server handler for WAI. Some random notes (a FAQ, if you will):

  • When a ResponseFile indicates a file which does not exist, an exception is thrown. This will close the connection to the client as well. You should handle file existance checks at the application level.


Run a Warp server

run :: Port -> Application -> IO ()Source

Run an Application on the given port, ignoring all exceptions.

runEx :: (SomeException -> IO ()) -> Port -> Application -> IO ()Source

Run an Application on the given port, with the given exception handler. Please note that you will also receive InvalidRequest exceptions.

serveConnections :: (SomeException -> IO ()) -> Port -> Application -> Socket -> IO ()Source

Runs a server, listening on the given socket. The user is responsible for closing the socket after runWithSocket completes. You must also supply a Port argument for use in the serverPort record; however, this field is only used for informational purposes. If you are in fact listening on a non-TCP socket, this can be a ficticious value.

Run a Warp server with full settings control


Utility functions for other packages