bind on ipv6 too

main
xenofem 2022-05-23 01:06:31 -04:00
parent b7a68bd4a4
commit 84bec924ab
1 changed files with 2 additions and 1 deletions

View File

@ -78,7 +78,8 @@ async fn main() -> std::io::Result<()> {
.service(json)
.service(actix_files::Files::new("/", static_dir.clone()).index_file("index.html"))
})
.bind("127.0.0.1:8080")?
.bind((std::net::Ipv4Addr::LOCALHOST, 8080))?
.bind((std::net::Ipv6Addr::LOCALHOST, 8080))?
.run()
.await
}