Crates.io | maquio |
lib.rs | maquio |
version | 0.1.2 |
source | src |
created_at | 2022-03-18 01:57:47.011266 |
updated_at | 2022-06-02 02:31:23.762185 |
description | library for building composable distributed systems |
homepage | |
repository | https://github.com/znx3p0/maquio |
max_upload_size | |
id | 552484 |
size | 13,951 |
Library for building composable distributed systems.
async fn main() -> Result<()> {
let router = Router::new()
.route("/", hello)
.route("/hello", hello);
let tcp_handle = Tcp::bind("127.0.0.1:8080", router).await?;
tcp_handle.await?;
Ok(())
}
async fn hello(c: Channel) -> Result<()> {
c.send("Hello world!");
Ok(())
}