Skip to content

Listen on IPv6, also? #834

Answered by SamuelBonilla
troelsarvin asked this question in Q&A
Discussion options

You must be logged in to vote

Try with:

let addr = ":::3000".parse().unwrap();
axum::Server::bind(&addr)
        .serve(app.into_make_service())
        .await
        .unwrap();

or

let addr = ":::3000".parse::<std::net::SocketAddr>().unwrap();
axum::Server::bind(&addr)
        .serve(app.into_make_service())
        .await
        .unwrap();

Replies: 3 comments 9 replies

Comment options

You must be logged in to vote
8 replies
@jplatte
Comment options

@troelsarvin
Comment options

@borrow-checker
Comment options

@llllvvuu
Comment options

@borrow-checker
Comment options

Answer selected by troelsarvin
Comment options

You must be logged in to vote
1 reply
@troelsarvin
Comment options

Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
6 participants