🐦 Humbird

humbird network communication core library
You Know, for Faster!

📦 Crates

humbird = "0.1.2"

👉 Usage

```rust use humbird::{ config::config::loadconfig, protocol::http::{Request, Response}, registerrouter_plugin, run, };

fn test1(req: Request, mut res: Response) -> Response { res.body = "response.....".asbytes().to_vec(); res }

fn test2(req: Request, mut res: Response) -> Response { res.body = "response.....".asbytes().to_vec(); res }

fn main() { // load config loadconfig( "/Users/max/GitProject/Humbird/humbird-server/src/config-template.toml".tostring(), ); // register routing plug-in // path binding registerrouterplugin!( "/".tostring() => test1, "/test".tostring() => test2 ); // run humbird server run!(); } ```

📃 Configuration

Server configuration file templat ``` [server]

port

port = "port"

[directory]

local static resource path

root-path = ""

[proxy]

target proxy host list

target = ["0.0.0.0:80", ""0.0.0.0:8080", "0.0.0.0:8888"]

WEIGHT : weight mode

RANDOM : random mode

POLLING : polling mode

mode = "WEIGHT" ```