diff options
| author | Fuwn <[email protected]> | 2022-03-27 06:03:33 +0000 |
|---|---|---|
| committer | Fuwn <[email protected]> | 2022-03-27 06:03:33 +0000 |
| commit | 97884a183f378fd996029cde769df2e974fff1eb (patch) | |
| tree | bf270166bffb4622e3bb2e027707b71b05e2501d /examples | |
| parent | refactor(tokio): reexport main (diff) | |
| download | windmark-97884a183f378fd996029cde769df2e974fff1eb.tar.xz windmark-97884a183f378fd996029cde769df2e974fff1eb.zip | |
feat(response): respond with file
Diffstat (limited to 'examples')
| -rw-r--r-- | examples/windmark.rs | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/examples/windmark.rs b/examples/windmark.rs index ed6bc9f..6ceeaf7 100644 --- a/examples/windmark.rs +++ b/examples/windmark.rs @@ -111,6 +111,9 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> { .mount("/redirect", |_| { Response::PermanentRedirect("gemini://localhost/test".into()) }) + .mount("/file", |_| { + Response::SuccessFile(include_bytes!("../LICENSE")) + }) .run() .await } |