chuchi 0.1.5

Http async library based on hyper and tokio
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
use chuchi::fs::StaticFile;

const HELLO_WORLD: StaticFile =
	StaticFile::no_cache("/", "./examples/www/hello_world.html");

#[tokio::main]
async fn main() {
	let mut server = chuchi::build("0.0.0.0:3000")
		.await
		.expect("Address could not be parsed");

	server.add_route(HELLO_WORLD);

	server.run().await.unwrap();
}