From 97d9cb2ab76486f9a1d65fe33df59a4958d0f399 Mon Sep 17 00:00:00 2001 From: David Pedersen Date: Sun, 13 Jun 2021 13:09:24 +0200 Subject: [PATCH] Tweak readme example --- README.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index bb7e5b6a..f0f54f18 100644 --- a/README.md +++ b/README.md @@ -32,7 +32,6 @@ on providing a core that is macro free. use awebframework::prelude::*; use hyper::Server; use std::net::SocketAddr; -use tower::make::Shared; #[tokio::main] async fn main() { @@ -42,12 +41,14 @@ async fn main() { // run it with hyper on localhost:3000 let addr = SocketAddr::from(([127, 0, 0, 1], 3000)); Server::bind(&addr) - .serve(Shared::new(app)) + .serve(app.into_make_service()) .await .unwrap(); } ``` +See the [crate documentation][docs] for way more examples. + ## Examples The [examples] folder contains various examples of how to use awebframework. The