2 releases
0.1.6 | Dec 31, 2024 |
---|---|
0.1.5 | Dec 16, 2024 |
0.1.3 |
|
#387 in HTTP server
258 downloads per month
15KB
204 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(query_params: Option<Vec<u8>>) -> HttpResponse {
HttpResponse::new(200, Some("Hello, World!".to_string()))
}
server.listener(80);