diff --git a/radicle-httpd/Cargo.toml b/radicle-httpd/Cargo.toml index 93825e6cf..491c013dc 100644 --- a/radicle-httpd/Cargo.toml +++ b/radicle-httpd/Cargo.toml @@ -38,6 +38,7 @@ tracing = { version = "0.1.37", default-features = false, features = ["std", "lo tracing-logfmt = { version = "0.2", optional = true } tracing-subscriber = { version = "0.3", default-features = false, features = ["std", "ansi", "fmt"] } ureq = { version = "2.9", default-features = false, features = ["json"] } +url = { version = "2.5.0" } [dependencies.radicle] path = "../radicle" diff --git a/radicle-httpd/src/commands/web.rs b/radicle-httpd/src/commands/web.rs index 952cc53c9..dc12ab679 100644 --- a/radicle-httpd/src/commands/web.rs +++ b/radicle-httpd/src/commands/web.rs @@ -1,7 +1,12 @@ use std::ffi::OsString; +use std::net::{IpAddr, Ipv4Addr, SocketAddr}; +use std::process::Command; +use std::thread::sleep; +use std::time::Duration; -use anyhow::anyhow; +use anyhow::{anyhow, Context}; use serde::{Deserialize, Serialize}; +use url::Url; use radicle::crypto::{PublicKey, Signature, Signer}; @@ -10,19 +15,20 @@ use radicle_cli::terminal::args::{Args, Error, Help}; pub const HELP: Help = Help { name: "web", - description: "Connect web with node", + description: "Start HTTP API server and connect the web explorer to it", version: env!("CARGO_PKG_VERSION"), usage: r#" Usage - rad web [