SeaBattle/rust/sea_battle_backend/src/args.rs

15 lines
433 B
Rust

use clap::Parser;
/// Simple sea battle server
#[derive(Parser, Debug, Clone)]
#[clap(author, version, about, long_about = None)]
pub struct Args {
/// The address this server will listen to
#[clap(short, long, value_parser, default_value = "0.0.0.0:7000")]
pub listen_address: String,
/// CORS (allowed origin) set to '*' to allow all origins
#[clap(short, long, value_parser)]
pub cors: Option<String>,
}