aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTeddy Wing2020-07-04 18:35:25 +0200
committerTeddy Wing2020-07-04 18:35:25 +0200
commit889481cc62eac9ec2fde2d78cd804b1a72ee046f (patch)
treeaa1b442ce9759bfe4c92298c85a515eb538fcbfb
parent839fcbab5a2d437b562903ba636381d5a8eca5d3 (diff)
downloadfastcgi-conduit-889481cc62eac9ec2fde2d78cd804b1a72ee046f.tar.bz2
Add README
-rw-r--r--README.md39
1 files changed, 39 insertions, 0 deletions
diff --git a/README.md b/README.md
new file mode 100644
index 0000000..4f89777
--- /dev/null
+++ b/README.md
@@ -0,0 +1,39 @@
+fastcgi-conduit
+===============
+
+[Documentation][fastcgi-conduit-docs]
+
+A [Conduit][conduit] interface for the [fastcgi] crate. This allows an
+application to run over FastCGI with an API that’s easier to use.
+
+
+## Example
+
+``` rust
+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()
+ )
+}
+```
+
+
+## License
+Copyright © 2020 Teddy Wing. Licensed under the GNU GPLv3+ (see the included
+COPYING file).
+
+
+[fastcgi-conduit-docs]: https://teddywing.github.io/fastcgi-conduit/fastcgi_conduit/
+[conduit]: https://lib.rs/crates/conduit
+[fastcgi]: https://lib.rs/crates/fastcgi