]> git.scottworley.com Git - voter/blob - src/main.rs
574d43f7c9605b6ecc49e80e1fbfdde64fd5e191
[voter] / src / main.rs
1 fn 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
7 cgi::cgi_try_main! { respond }