#[macro_use] extern crate clap; fn main() { let matches = clap_app!(pjournal => (version: "0.1") (author: "KJ Ørbekk ") (about: "Practice Journaling") (@arg strava_client_secret: --strava_client_secret +required +takes_value "Client secret for strava authentication") (@arg strava_client_id: --strava_client_id +required +takes_value "Client id for strava authentication") (@arg base_url: --base_url +takes_value "Endpoint for this web app") ) .get_matches(); let config = pjournal::Config { client_id: matches .value_of("strava_client_id") .unwrap().to_string(), client_secret: matches .value_of("strava_client_secret") .unwrap().to_string(), base_url: matches .value_of("base_url") .unwrap_or("http://localhost:8000").to_string(), }; pjournal::start_server(config); }