beet 0.0.8

Malleable Application Framework
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
//! A minimal server example
use beet::prelude::*;

fn main() {
	App::new()
		.add_plugins((
			MinimalPlugins,
			LogPlugin::default(),
			ServerPlugin::default(),
		))
		.add_observer(|ev: On<Insert, Request>, mut commands: Commands| {
			commands
				.entity(ev.event_target())
				.insert(Response::ok_body("hello world", "text/plain"));
		})
		.run();
}