This commit is contained in:
2020-04-18 02:06:50 +08:00
parent 768e26f239
commit 4ac22d6800
3 changed files with 112 additions and 0 deletions

View File

@@ -9,6 +9,11 @@ async fn hello(_: Request<Body>) -> Result<Response<Body>, Infallible> {
// https://github.com/hyperium/hyper/blob/master/examples/hello.rs
#[tokio::main]
pub async fn main() -> Result<(), Box<dyn std::error::Error + Send + Sync>> {
pretty_env_logger::init();
log::info!("hello hyper.rs");
log::warn!("hello hyper.rs");
log::error!("hello hyper.rs");
// For every connection, we must make a `Service` to handle all
// incoming HTTP requests on said connection.