From 470d6ceabd1832f6c3fa0a99bca0233b164c43b8 Mon Sep 17 00:00:00 2001
From: David Pedersen <david.pdrsn@gmail.com>
Date: Sun, 6 Jun 2021 11:42:44 +0200
Subject: [PATCH] Add prelude

---
 examples/hello_world.rs |  2 +-
 src/lib.rs              | 10 ++++++++++
 2 files changed, 11 insertions(+), 1 deletion(-)

diff --git a/examples/hello_world.rs b/examples/hello_world.rs
index 9aefe148..3d6f9d0f 100644
--- a/examples/hello_world.rs
+++ b/examples/hello_world.rs
@@ -2,7 +2,7 @@ use http::{Request, StatusCode};
 use hyper::Server;
 use std::net::SocketAddr;
 use tower::make::Shared;
-use tower_web::{body::Body, extract, get, response, route, AddRoute};
+use tower_web::prelude::*;
 
 #[tokio::main]
 async fn main() {
diff --git a/src/lib.rs b/src/lib.rs
index b7e8043f..06492fae 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -68,6 +68,16 @@ pub use self::{
 pub use async_trait::async_trait;
 pub use tower_http::add_extension::{AddExtension, AddExtensionLayer};
 
+pub mod prelude {
+    pub use crate::{
+        body::Body,
+        extract,
+        handler::{get, on, post, Handler},
+        response, route,
+        routing::AddRoute,
+    };
+}
+
 pub fn route<S>(spec: &str, svc: S) -> Route<S, EmptyRouter>
 where
     S: Service<Request<Body>, Error = Infallible> + Clone,