Skip to content

Commit

Permalink
chore: update merod command instructions
Browse files Browse the repository at this point in the history
  • Loading branch information
MatejVukosav committed Dec 19, 2024
1 parent bae5e0c commit aa42321
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 6 deletions.
17 changes: 11 additions & 6 deletions crates/merod/src/cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)]
Expand Down
1 change: 1 addition & 0 deletions crates/merod/src/cli/relay.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit aa42321

Please sign in to comment.