diff --git a/src/Tiny_httpd.mli b/src/Tiny_httpd.mli index 318728a6..f37f18be 100644 --- a/src/Tiny_httpd.mli +++ b/src/Tiny_httpd.mli @@ -11,12 +11,14 @@ features by declaring a few endpoints, including one for uploading files: {[ +module S = Tiny_httpd let () = let server = S.create () in (* say hello *) S.add_path_handler ~meth:`GET server - "/hello/%s@/" (fun name _req -> S.Response.make_string (Ok ("hello " ^name ^"!\n"))); + "/hello/%s@/" (fun name _req -> + S.Response.make_string (Ok ("hello " ^name ^"!\n"))); (* echo request *) S.add_path_handler server "/echo" (fun req -> S.Response.make_string diff --git a/src/bin/dune b/src/bin/dune index ab8a97e0..31303a70 100644 --- a/src/bin/dune +++ b/src/bin/dune @@ -4,4 +4,4 @@ (public_name http_of_dir) (package tiny_httpd) (flags :standard -warn-error -3) - (libraries tiny_httpd str)) + (libraries tiny_httpd)) diff --git a/tiny_httpd.opam b/tiny_httpd.opam index f4115dfc..4d9d5f5f 100644 --- a/tiny_httpd.opam +++ b/tiny_httpd.opam @@ -3,7 +3,7 @@ version: "0.1" authors: ["Simon Cruanes"] maintainer: "simon.cruanes.2007@m4x.org" license: "MIT" -description: "Minimal HTTP server using good old threads" +synopsis: "Minimal HTTP server using good old threads" build: [ ["dune" "build" "@install" "-p" name "-j" jobs] ["dune" "build" "@doc" "-p" name] {with-doc} @@ -20,3 +20,4 @@ homepage: "https://github.com/c-cube/tiny_httpd/" doc: "https://c-cube.github.io/tiny_httpd/" bug-reports: "https://github.com/c-cube/tiny_httpd/issues" dev-repo: "git+https://github.com/c-cube/tiny_httpd.git" +post-messages: "tiny http server, with blocking IOs. Also ships with a `http_of_dir` program."