wobsurv-0.1.0: A simple and highly performant HTTP file server
Wobsurv
Synopsis
data Settings Source
Settings for running the server.
Constructors
Fields
Whether to log requests in the stdout.
stdout
A port to listen on.
A maximum amount of clients. When this amount is reached the server rejects all the further connections with a "Service Unavailable" status.
A path to the directory containing template files for server responses.
A directory, the contents of which should be served.
MIME content-type mappings.
Instances
serve :: Settings -> IO () Source
Run the server with the provided settings.
This operation is blocking. If you need to be able to stop the server run it in a separate thread, killing that thread will stop the server and properly release all the resources acquired by the server.