yurt is an HTTP microframework for OCaml based on Cohttp.
opam install yurt open Yurt.Server
open Yurt.Route
(* Create a server *)
server "127.0.0.1" 1234
(* Add a handler *)
>| get "/<name:string>" (fun req params body ->
let body = Yurt_html.h1 ("Hello " ^ param_string params "name") in
respond_html ~status:`OK ~body ())
(* Run it *)
|> runSee example/example.ml for more examples.