zero4rs 2.0.0

zero4rs is a powerful, pragmatic, and extremely fast web framework for Rust
Documentation
use actix_web::dev::Server;

use crate::server::startup;

pub struct Application {
    pub server: Server,
}

impl Application {
    pub async fn run<F>(server_name: &'static str, cfg: F)
    where
        F: Fn(&mut actix_web::web::ServiceConfig, actix_web::web::Data<crate::server::AppContext>)
            + Send
            + Clone
            + 'static,
    {
        // // let _simple_task1 = tokio::spawn(crate::worker_loop::execute_task(
        // //     "Task1",
        // //     "0/1 * * * * * *",
        // // ));

        let app_context = crate::server::AppContext::build(server_name).await;

        match startup::run(app_context, server_name, cfg).await {
            Ok(_) => {}
            Err(err) => {
                log::error!("error={:?}", err);
            }
        };
    }
}