diff options
Diffstat (limited to 'examples/tutorial01')
-rw-r--r-- | examples/tutorial01/main.rs | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/examples/tutorial01/main.rs b/examples/tutorial01/main.rs index 62c32cd..4db9897 100644 --- a/examples/tutorial01/main.rs +++ b/examples/tutorial01/main.rs @@ -1,16 +1,21 @@ +use tosin::Settings; use tosin::contrib::admin; use tosin::http::Filter; use tosin::urls::{UrlMap, path}; mod polls; -pub fn urls() -> UrlMap { +fn urls() -> UrlMap { path!("polls" / ..).and(polls::urls::urls()) .or(path!("admin" / ..).and(admin::site::urls::urls())) .unify() .boxed() } -fn main() { - tosin::run_server(urls()); +fn settings() -> Settings { + Settings { + ..Settings::default() + } } + +tosin::main!(urls(), settings()); |