B0_show_urlAction and unit execution to show URLs after builds.
This module provides the .show-url action which allows to reload URLs in your browser when you build static websites or web servers.
type url = [ | `Url of B0_std.Net.Url.tThe URL.
*)| `In of B0_env.dir * B0_std.Fpath.tThe path in given directory.
*)| `Fun of
string * (B0_env.t -> B0_unit.t -> (B0_std.Net.Url.t, string) Stdlib.result) ]The type for dermining the URL to show.
val url : url B0_meta.keyurl defines the default URL to show when .show-url is used on a unit without specifying a path.
val get_url : B0_env.t -> B0_unit.t -> (B0_std.Net.Url.t, string) Stdlib.resultget_url env u performs the logic to get the url for unit u in environment env.
val listen_args : (authority:string -> B0_std.Cmd.t) B0_meta.keylisten_args defines the arguments to specify for how to make the server listen on authority for connections. These arguments are added at the end of the server tool invocation or before a -- token if there is one.
val timeout_s : int B0_meta.keytimeout_s defines the maximal number of seconds to wait for the server to be connectable before reloading the URL. Defaults to 1s.
val action : B0_unit.Action.taction is a unit action that invokes the show-url tool on the unit's url. If no command line arguments are specified on invocation --prefix is added.
.show-url unitval unit : B0_unit.tunit is the .show-url unit.
See b0 -- .show-url --help for more information.