All Downloads are FREE. Search and download functionalities are using the official Maven repository.

rust-server.example-server-main.mustache Maven / Gradle / Ivy

There is a newer version: 7.6.0
Show newest version
//! Main binary entry point for {{{externCrateName}}} implementation.

#![allow(missing_docs)]

use clap::{App, Arg};

mod server;


/// Create custom server, wire it to the autogenerated router,
/// and pass it to the web server.
#[tokio::main]
async fn main() {
    env_logger::init();

    let matches = App::new("server")
        .arg(Arg::with_name("https")
            .long("https")
            .help("Whether to use HTTPS or not"))
        .get_matches();

    let addr = "127.0.0.1:{{{serverPort}}}";

    server::create(addr, matches.is_present("https")).await;
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy