Function vegemite::framework::run

source ·
pub fn run<A>(address: A, router: Route)where
    A: ToSocketAddrs,
Expand description

Application entry point. Call this function to run your application.

Examples found in repository?
examples/html.rs (line 30)
27
28
29
30
31
fn main() {
    let router = Route::empty().route("page", Route::new(sys![page]));

    run("0.0.0.0:5000", router);
}
More examples
Hide additional examples
examples/middleware.rs (line 12)
7
8
9
10
11
12
13
fn main() {

    // ! systems are run from left to right until a response is received from a system
    let router = Route::new(sys![middleware]);

    run("0.0.0.0:5000", router)
}
examples/hello_world.rs (line 22)
17
18
19
20
21
22
23
fn main() {
    // systems are executed from the root to the endpoint and from left to right of each node until
    // a response is formed. 
    let router = Route::new(sys![get, post]);

    run("0.0.0.0:5000", router);
}