d1df2e73 SW |
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 } |