6 releases
new 0.1.5 | Dec 16, 2024 |
---|---|
0.1.4 | Dec 2, 2024 |
0.1.3 | Nov 28, 2024 |
#332 in HTTP server
543 downloads per month
15KB
213 lines
A Simple HTTP Server Implementation
Example
Create a server instance and register a GET route:
use guest_server::{Server, HttpResponse};
let mut server = Server::new();
server.get("/", home);
fn home(_: String) -> HttpResponse {
HttpResponse::new(200, Some("Hello, World!".to_string()))
}
server.listener(80);