rustigo 1.1.4

A Rust webserver inspired by the Go standard library's HTTPServer
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
use rustigo::prelude::*;

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

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

    rustigo.handle("/", index);

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