ogcapi_services/config.rs
1use clap::Parser;
2
3/// Application configuration
4#[derive(Parser, Debug)]
5pub struct Config {
6 /// Listening port of the server
7 #[clap(long, env("APP_PORT"), default_value = "8484")]
8 pub port: u16,
9 /// istening host address of the server
10 #[clap(long, env("APP_HOST"), default_value = "0.0.0.0")]
11 pub host: String,
12 /// Postgres database url
13 #[clap(long, env, hide_env_values = true, value_parser)]
14 pub database_url: url::Url,
15 /// OpenAPI definition
16 #[clap(long, env, value_parser)]
17 pub openapi: Option<std::path::PathBuf>,
18}