Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion cohttp-async/bin/cohttp_curl_async.ml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ let _ =
Logs.set_level @@ Some Logs.Debug;
Logs.set_reporter (Logs_fmt.reporter ());
let open Command.Spec in
Command.async ~summary:"Fetch URL and print it"
Command.async_spec ~summary:"Fetch URL and print it"
(empty
+> anon ("url" %: string)
+> flag "-X" (optional_with_default "GET" string)
Expand Down
4 changes: 2 additions & 2 deletions cohttp-async/bin/cohttp_server_async.ml
Original file line number Diff line number Diff line change
Expand Up @@ -120,14 +120,14 @@ let start_server docroot port index cert_file key_file verbose () =
Logs.err (fun f -> f "Error from %s" (Socket.Address.to_string addr));
Logs.err (fun f -> f "%s" @@ Exn.to_string exn)))
~mode
(Tcp.on_port port)
(Tcp.Where_to_listen.of_port port)
(handler ~info ~docroot ~index) >>= fun _serv ->
Deferred.never ()

let () =
let open Command in
run @@
async ~summary:"Serve the local directory contents via HTTP or HTTPS"
async_spec ~summary:"Serve the local directory contents via HTTP or HTTPS"
Spec.(
empty
+> anon (maybe_with_default "." ("docroot" %: string))
Expand Down