programatik29 / axum-server

High level server designed to be used with axum framework.
MIT License
166 stars 54 forks source link

[FR]: support `app.into_make_service_with_connect_info::<SocketAddr>()` #91

Closed mokeyish closed 6 months ago

mokeyish commented 8 months ago

Hello, thanks for your nice library!

Currently, app.into_make_service_with_connect_info::<SocketAddr>() is not support.


use axum::{
    routing::get,
    Router,
};

let app = Router::new().route("/", get(|| async { "Hi!" }));

axum::Server::bind(&"0.0.0.0:3000".parse().unwrap())
    .serve(app.into_make_service())
    .await
    .expect("server failed");

https://docs.rs/axum/latest/src/axum/routing/mod.rs.html#384-388

programatik29 commented 7 months ago

Can you provide a reproducible example of it not working?

Currently you can get connection info as shown in this example.

mokeyish commented 6 months ago

thanks, that worked.