Legend:
Library
Module
Module type
Parameter
Class
Class type
Plain HTTP file serving from a read-only key-value store.
start http_port ?request_fn fs http will start a static HTTP server listening on http_port. The files to serve will be looked up from the fs key-value store.
If request_fn is supplied, the URI and default header set (including the MIME content-type header) will be passed to it and the response used as the response header set instead.
Parameters
moduleFS : Mirage_kv.RO
moduleS : Cohttp_lwt.S.Server
Signature
val start :
http_port:int ->?request_fn:(Uri.t ->Cohttp.Header.t ->Cohttp.Header.t)->FS.t ->([> `TCP of int ]->S.t ->'a)->'a