Module Webs_cli

Command line interface support.

Options

val listener : ?opts:string list -> ?docs:string -> ?default_port:int -> ?default_listener:Webs_listener.t -> unit -> Webs_listener.t Cmdliner.Term.t

listener is an option for specifying a connection listener.

  • default_port is the default port when unspecified (defaults to 8000).
  • default_listen is the default listener when unspecified (defaults to `Host ("localhost", default_port)).
  • docs is the manual section where the options are documented.
  • opts are the options to use (defaults to ["l";"listen"]).
val service_path : ?opts:string list -> ?docs:string -> unit -> Webs.Http.Path.t option Cmdliner.Term.t

service_path () is an option for specifying an optional service path.

  • docs is the manual sectino where the options are documented
  • opts are the options to use (defaults to "service-path")
val docroot : ?opts:string list -> ?docs:string -> unit -> string option Cmdliner.Term.t

docroot is an option for specifying an optional directory for serving files.

  • docs is the section where the option are documented.
  • opts are the options to use (defaults to ["d";"docroot"]).
val max_connections : ?opts:string list -> ?docs:string -> unit -> int Cmdliner.Term.t

max_connections is an option for specifying the maximal amount of concurrent connections served. Defaults to Webs_http11_gateway.default_max_connections.

  • docs is the section where the option is documented.
  • opts are the options to use (defaults to ["m";"max-connections"])