bevy_webserver 0.2.1

A web server integration for the Bevy game engine that allows you to easily append a webserver to Bevy.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
fn main() {
    use bevy_webserver::RouterAppExt;
    bevy::prelude::App::new()
        .add_plugins((
            bevy::prelude::MinimalPlugins,
            bevy_webserver::BevyWebServerPlugin,
        ))
        .route("/hello_world", axum::routing::get(hello_world))
        .run();
}

async fn hello_world() -> axum::response::Html<String> {
    axum::response::Html("<p> hello world! </p>".to_string())
}