[][src]Crate fastcgi_conduit

fastcgi-conduit

FastCGI-Conduit provides a Conduit interface to FastCGI, enabling a high-level API for FastCGI applications.

Example

use conduit::{header, Body, RequestExt, Response};
use fastcgi_conduit::Server;


fn main() {
    Server::start(handler);
}

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()
    )
}

Structs

Server

The application server that interfaces with FastCGI.