Resolve the optional HTTP listen host from CLI arguments and environment.
CLI arguments to inspect for --host.
--host
Environment object to read B2_HTTP_HOST from.
B2_HTTP_HOST
Explicit listen host, or undefined for Node's default listen host.
undefined
PortUsageError when the selected host is empty or invalid.
const host = getHost(["--host", "127.0.0.1"], process.env); Copy
const host = getHost(["--host", "127.0.0.1"], process.env);
Resolve the optional HTTP listen host from CLI arguments and environment.