bind on ipv6 too

This commit is contained in:
xenofem 2022-05-23 01:06:31 -04:00
parent b7a68bd4a4
commit 84bec924ab

View file

@ -78,7 +78,8 @@ async fn main() -> std::io::Result<()> {
.service(json) .service(json)
.service(actix_files::Files::new("/", static_dir.clone()).index_file("index.html")) .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() .run()
.await .await
} }