ptth/src/bin/ptth_server.rs

24 lines
439 B
Rust
Raw Normal View History

use std::{
error::Error,
path::PathBuf,
};
use structopt::StructOpt;
2020-11-06 04:18:47 +00:00
#[derive (Debug, StructOpt)]
struct Opt {
#[structopt (long)]
file_server_root: Option <PathBuf>,
}
#[tokio::main]
async fn main () -> Result <(), Box <dyn Error>> {
tracing_subscriber::fmt::init ();
let config_file = ptth::load_toml::load ("config/ptth_server.toml");
2020-11-06 04:18:47 +00:00
ptth::server::run_server (
config_file,
ptth::graceful_shutdown::init ()
2020-11-06 04:18:47 +00:00
).await
}