Skip to content
Discussion options

You must be logged in to vote

Solved it! Don't forget to add futures = "0.3.5" to your Cargo.toml.

use futures::future;
// ...
#[rocket::main]
async fn main() {
    if env::var("SSL_PORT").is_ok() {
        let _ = future::join(http_rocket().launch(), https_rocket().launch()).await;
    } else {
        let _ = http_rocket().launch().await;
    }
}

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@the10thWiz
Comment options

@vincentjorgensen
Comment options

Answer selected by vincentjorgensen
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants