You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
thanks for developing this very useful crate!
I want to run a server that serves the same app with http and https on different ports.
I've seen there's an example for running different apps on http and https.
I could achieve this by running app.clone():
let a = axum_server::bind_rustls("0.0.0.0:8080".parse().unwrap(),
tls_config,).handle(server_handle).serve(app.clone().into_make_service());let b = axum_server::bind("0.0.0.0:8081".parse().unwrap()).serve(app.into_make_service());select!{
_ = a => {},
_ = b => {}}
However, this increased the memory usage of the server significantly. So I'm wondering if there is a better way to achieve this? Can someone maybe give me a hint?
The text was updated successfully, but these errors were encountered:
hpsjakob
changed the title
Serve http and https
Serve same app on http and https
Jan 25, 2024
Hello,
thanks for developing this very useful crate!
I want to run a server that serves the same app with http and https on different ports.
I've seen there's an example for running different apps on http and https.
I could achieve this by running
app.clone()
:However, this increased the memory usage of the server significantly. So I'm wondering if there is a better way to achieve this? Can someone maybe give me a hint?
The text was updated successfully, but these errors were encountered: