This commit is contained in:
Stefan Schwarz 2020-08-07 17:07:15 +02:00
commit f76cbd9d46
4 changed files with 1904 additions and 0 deletions

23
src/main.rs Normal file
View file

@ -0,0 +1,23 @@
use argh::FromArgs;
/// Configuration
#[derive(FromArgs, Debug)]
struct Config {
/// listen address
#[argh(option, default = "[::1]:8080")]
listen: String,
}
fn main() {
let config: Config = argh::from_env();
println!("{:?}, config")
}
//#[async_std::main]
//async fn main() -> Result<(), std::io::Error> {
// tide::log::start();
// let config: Config = argh::from_env();
// let mut app = tide::new();
//
// app.listen(config.listen).await
//}