Crate rustigo

Source
Expand description

Rustigo is a simple web server that allows you to handle requests with ease.

§Example usage:

use rustigo::prelude::*;

fn index(stream: TcpStream, _: Request) {
    html!(stream; "<h1>Hello, world!</h1>");
}

fn main() {
    let mut rustigo = Rustigo::default();

    rustigo.handle("/", Arc::new(index));

    rustigo.listen("localhost:7878", 4).unwrap();
}

Modules§

prelude

Macros§

html
A macro to return html content to a TCPStream. Example usage:
text
A macro to return text content to a TCPStream. Example usage:

Structs§

Rustigo
Rustigo is a simple web server that allows you to handle requests with ease. It’s a rust webserver inspired by the Go standard library’s HTTPServer.