Cohttp_static_handlermodule Http_handler : sig ... endmodule Asset : sig ... endmodule Single_page_handler : sig ... endval directory_handler :
?log:Async.Log.t ->
?headers:Cohttp.Header.t ->
?directory:string ->
unit ->
Http_handler.tdirectory_handler ?log ?directory () returns a handler that serves all files in directory.
A file at directory/path/to/file will be served at host:port/path/to/file.
Directory defaults to the current working directory if none is provided.
If there is a gzipped version of a requested file located at directory/path/to/file.gz, the gzipped file will be served in its place.
Requests are logged to log, which defaults to Log.Global.log.