#[async_std::main]
async fn main() -> Result<(), tide::Error> {
- env_logger::init();
let matches = app_from_crate!()
.arg(
Arg::with_name("config")
)
.subcommand(SubCommand::with_name("all").about("Serve the website, websocket connections and start a dealer for each game (default)"))
.get_matches();
+
let config = match matches.value_of_os("config") {
Some(path) => toml::from_str(&read_to_string(path)?)?,
None => Config::default(),
};
+ env_logger::Builder::from_env(env_logger::Env::default().default_filter_or(config.log.filter).default_write_style_or(config.log.style))
+ .format_timestamp_millis()
+ .init();
+
let mut run_server = true;
let mut run_dealer = true;
let mut partition = Partition::default();