main

Attribute Macro main 

Source
#[main]
Expand description

Main entry point macro for RustAPI applications

This macro wraps your async main function with the tokio runtime.

§Example

use rustapi_rs::prelude::*;

#[rustapi::main]
async fn main() -> Result<()> {
    RustApi::new()
        .mount(hello)
        .run("127.0.0.1:8080")
        .await
}