start

Function start 

Source
pub async fn start(
    app: App,
    addr: impl Into<Option<&str>>,
    options: Option<Vec<Box<dyn ServiceOption>>>,
) -> Result<()>
Examples found in repository?
examples/simple.rs (line 18)
5async fn main() {
6    let mongo_uri = std::env::var("MONGO_URI").expect("no MONGO_URI env");
7    tracing_subscriber::registry()
8        .with(tracing_subscriber::fmt::layer())
9        .init();
10
11    let db = mongodb::Client::with_uri_str(mongo_uri)
12        .await
13        .expect("db error")
14        .database("kuafu_next");
15
16    let app = service::App::new(db).await;
17
18    hi_push::http::start(app, "0.0.0.0:8080", None)
19        .await
20        .expect("http start error")
21}