diff --git a/crates/merod/src/cli.rs b/crates/merod/src/cli.rs index 436edd41c..799588637 100644 --- a/crates/merod/src/cli.rs +++ b/crates/merod/src/cli.rs @@ -16,17 +16,22 @@ use relay::RelayCommand; use run::RunCommand; pub const EXAMPLES: &str = r" - # Initialize a new node + # Initialize node + $ merod --node-name node1 init --server-port 2428 --swarm-port 2528 + + # Initialize node with a custom home directory data + $ mkdir data $ merod --home data/ --node-name node1 init # Configure an existing node - $ merod --home data/ --node-name node1 config --server-host 143.34.182.202 --server-port 3000 + $ merod --node-name node1 config --server-host 143.34.182.202 --server-port 3000 + + # Run a node + $ merod --node-name node1 run - # Run a node as a peer - $ merod --home data/ --node-name node1 run + # Relay incoming requests to specific location + $ merod --node-name node2 relay --listen 127.0.0.1:3333 - # Run a node as a coordinator - $ merod --home data/ --node-name node1 run --node-type coordinator "; #[derive(Debug, Parser)] diff --git a/crates/merod/src/cli/relay.rs b/crates/merod/src/cli/relay.rs index b099520f7..a10edeb74 100644 --- a/crates/merod/src/cli/relay.rs +++ b/crates/merod/src/cli/relay.rs @@ -33,6 +33,7 @@ pub struct RelayCommand { pub listen: SocketAddr, } +/// Relay incoming requests to specific location impl RelayCommand { pub async fn run(self, root_args: RootArgs) -> EyreResult<()> { let path = root_args.home.join(root_args.node_name);