diff options
Diffstat (limited to 'examples')
| -rw-r--r-- | examples/windmark.rs | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/examples/windmark.rs b/examples/windmark.rs index 5568249..e1cb513 100644 --- a/examples/windmark.rs +++ b/examples/windmark.rs @@ -21,7 +21,7 @@ #[macro_use] extern crate log; -use windmark::response::Response; +use windmark::Response; fn main() -> std::io::Result<()> { windmark::Router::new() @@ -29,6 +29,9 @@ fn main() -> std::io::Result<()> { .set_certificate_chain_file("windmark_pair.pem") .enable_default_logger(true) .set_error_handler(|_| Response::PermanentFailure("error...".to_string())) + .attach(|r| { + r.mount("/module", |_| Response::Success("This is a module!".into())); + }) .set_pre_route_callback(|stream, url, _| { info!( "accepted connection from {} to {}", |