]> git.scottworley.com Git - voter/blame_incremental - src/main.rs
Start with the cgi example usage
[voter] / src / main.rs
... / ...
CommitLineData
1fn respond(request: cgi::Request) -> Result<cgi::Response, String> {
2 let greeting = std::fs::read_to_string("greeting.txt").map_err(|_| "Couldn't open file")?;
3
4 Ok(cgi::text_response(200, greeting))
5}
6
7cgi::cgi_try_main! { respond }