blob: 160bd6a7ca215be6b5847bf69a1e9d906357876e (
plain)
| 1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
 | use conduit::{header, Body, RequestExt, Response};
use fastcgi_conduit::Server;
fn main() {
    Server::start(handler).unwrap();
}
fn handler(_req: &mut dyn RequestExt) -> std::io::Result<Response<Body>> {
    Ok(
        Response::builder()
            .header(header::CONTENT_TYPE, "text/html")
            .body(Body::from_static(b"<h1>Hello</h1>"))
            .unwrap()
    )
}
 |