Skip to content

Commit e1e838f

Browse files
committed
feat(cli): add initial start command for the Web API
1 parent c7c868d commit e1e838f

2 files changed

Lines changed: 15 additions & 0 deletions

File tree

src/cli.rs

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,5 +120,16 @@ pub enum Commands {
120120

121121
#[arg(value_name = "BASE64")]
122122
data: String,
123+
},
124+
125+
#[command(
126+
about = "Start WebAPI with given bind IP and port"
127+
)]
128+
Start { // TODO
129+
#[arg(value_name = "IP")]
130+
ip: String,
131+
132+
#[arg(value_name = "PORT")]
133+
port: u16,
123134
}
124135
}

src/main.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -243,6 +243,10 @@ async fn main() -> Result<()> {
243243
}
244244
}
245245
}).await;
246+
},
247+
248+
cli::Commands::Start { ip, port } => {
249+
webapi::start(port).await;
246250
}
247251
}
248252

0 commit comments

Comments
 (0)