| Crates.io | rustigo |
| lib.rs | rustigo |
| version | 1.1.4 |
| created_at | 2023-12-10 23:08:13.384006+00 |
| updated_at | 2025-04-30 20:01:27.940493+00 |
| description | A Rust webserver inspired by the Go standard library's HTTPServer |
| homepage | https://github.com/BenMcAvoy/Rustigo |
| repository | https://github.com/BenMcAvoy/Rustigo |
| max_upload_size | |
| id | 1064585 |
| size | 18,099 |
A Rust webserver inspired by the Go standard library's HTTPServer
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();
}