(
port: u16,
hostname: String,
mdns: bool,
mdns_domain: String,
cors: Vec<String>,
)
| 1910 | } |
| 1911 | |
| 1912 | async fn run_web_command( |
| 1913 | port: u16, |
| 1914 | hostname: String, |
| 1915 | mdns: bool, |
| 1916 | mdns_domain: String, |
| 1917 | cors: Vec<String>, |
| 1918 | ) -> anyhow::Result<()> { |
| 1919 | let bind_port = if port == 0 { 3000 } else { port }; |
| 1920 | let display_host = if hostname == "0.0.0.0" { |
| 1921 | "localhost".to_string() |
| 1922 | } else { |
| 1923 | hostname.clone() |
| 1924 | }; |
| 1925 | let url = format!("http://{}:{}", display_host, bind_port); |
| 1926 | println!("Web interface: {}", url); |
| 1927 | try_open_browser(&url); |
| 1928 | run_server_command("web", bind_port, hostname, mdns, mdns_domain, cors).await |
| 1929 | } |
| 1930 | |
| 1931 | async fn run_acp_command( |
| 1932 | port: u16, |
no test coverage detected