diff options
author | Teddy Wing | 2020-06-23 00:43:05 +0200 |
---|---|---|
committer | Teddy Wing | 2020-06-23 00:43:05 +0200 |
commit | c41a74411e155dc4e6caaec574786890470ef986 (patch) | |
tree | a925c21a910b5b40f7bf8fc0d59b14e6dbf3df44 /examples | |
parent | 1f379b4cfa7c05f8f3429ddd666b1b9054020937 (diff) | |
download | fastcgi-conduit-c41a74411e155dc4e6caaec574786890470ef986.tar.bz2 |
Ideas for API
I want a wrapper for `fastcgi::run()` that uses `http::Request` and
`http::Response`.
Add a `lighttpd.conf` to test the FastCGI.
Print FastCGI params to give me an idea of what the request looks like.
Diffstat (limited to 'examples')
-rw-r--r-- | examples/server.rs | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/examples/server.rs b/examples/server.rs new file mode 100644 index 0000000..f3a9c76 --- /dev/null +++ b/examples/server.rs @@ -0,0 +1,17 @@ +extern crate http; + +use http::{Response, StatusCode}; + +use fcgi_rs; + + +fn main() { + fcgi_rs::run(|req| { + let resp = Response::builder() + .status(StatusCode::OK) + .body(()) + .unwrap(); + + return resp; + }); +} |