c-cube / tiny_httpd

Minimal HTTP server using good old threads + blocking IO, with a small request router.
https://c-cube.github.io/tiny_httpd
76 stars 11 forks source link

basic "static file server" middleware #12

Closed c-cube closed 2 years ago

c-cube commented 4 years ago
val serve_dir: ?upload:bool -> prefix:string -> path:string -> Tiny_httpd.t -> unit

registers a path "/prefix/%s" for GET-ing files and possibly PUT-ing files if upload=true.

The code can be adapted from http_of_dir.

craff commented 2 years ago

You can assign this one to me ... I am starting right now...