mirror of
https://github.com/scsibug/nostr-rs-relay.git
synced 2025-09-01 03:40:46 -04:00
improvement: use clap for command line args
This commit is contained in:
committed by
Greg Heartsfield
parent
d06d227ebe
commit
73f4f60cc7
14
src/cli.rs
Normal file
14
src/cli.rs
Normal file
@@ -0,0 +1,14 @@
|
||||
use clap::Parser;
|
||||
|
||||
#[derive(Parser)]
|
||||
#[command(about = "A nostr relay written in Rust", author = env!("CARGO_PKG_AUTHORS"), version = env!("CARGO_PKG_VERSION"))]
|
||||
pub struct CLIArgs {
|
||||
#[arg(
|
||||
short,
|
||||
long,
|
||||
help = "Use the <directory> as the location of the database",
|
||||
default_value = ".",
|
||||
required = false
|
||||
)]
|
||||
pub db: String,
|
||||
}
|
Reference in New Issue
Block a user