diff options
| author | Benedikt Peetz <benedikt.peetz@b-peetz.de> | 2025-09-23 08:33:06 +0200 |
|---|---|---|
| committer | Benedikt Peetz <benedikt.peetz@b-peetz.de> | 2025-09-23 08:34:45 +0200 |
| commit | 2dc74d621399be454abbbff892fb46204ddc6e7b (patch) | |
| tree | f9525527fc09c465d4e2e4a4f665bfd444b889f8 /crates/rocie-server/src/cli.rs | |
| parent | feat: Provide basic barcode handling support (diff) | |
| download | server-2dc74d621399be454abbbff892fb46204ddc6e7b.zip | |
feat(treewide): Add tests and barcode buying/consuming
Diffstat (limited to 'crates/rocie-server/src/cli.rs')
| -rw-r--r-- | crates/rocie-server/src/cli.rs | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/crates/rocie-server/src/cli.rs b/crates/rocie-server/src/cli.rs index 5961ab7..b2ec214 100644 --- a/crates/rocie-server/src/cli.rs +++ b/crates/rocie-server/src/cli.rs @@ -1,3 +1,5 @@ +use std::path::PathBuf; + use clap::{Parser, Subcommand}; #[derive(Parser)] @@ -8,8 +10,20 @@ pub(crate) struct CliArgs { #[derive(Subcommand)] pub(crate) enum Command { - /// Serve the server on the default ports. - Serve, + /// Serve the server. + Serve { + /// Which port to serve the server on. + #[arg(short, long, default_value = "8080")] + port: u16, + + /// Which host to serve the server on. + #[arg(short = 'b', long, default_value = "127.0.0.1")] + host: String, + + /// Path to the database to use to store data. + #[arg(short, long, env = "ROCIE_DB_PATH")] + db_path: PathBuf, + }, /// Print the `OpenAPI` API documentation to stdout. OpenApi, |
