mirror of
https://github.com/actix/examples
synced 2025-06-26 17:17:42 +02:00
normalize ports to 8080
This commit is contained in:
@ -5,6 +5,8 @@ edition = "2021"
|
||||
|
||||
[dependencies]
|
||||
actix-web = { version = "4", features = ["rustls"] }
|
||||
actix-web-lab = "0.13"
|
||||
|
||||
env_logger = "0.9"
|
||||
futures-util = { version = "0.3.7", default-features = false, features = ["std"] }
|
||||
log = "0.4"
|
||||
|
@ -61,8 +61,8 @@ async fn main() -> std::io::Result<()> {
|
||||
})
|
||||
.service(index)
|
||||
})
|
||||
.bind("127.0.0.1:80")? // Port 80 to listen for HTTP request
|
||||
.bind_rustls("127.0.0.1:443", config)? // Port 443 to listen for HTTPS request
|
||||
.bind(("127.0.0.1", 80))? // HTTP port
|
||||
.bind_rustls(("127.0.0.1", 443), config)? // HTTPS port
|
||||
.run()
|
||||
.await
|
||||
}
|
||||
|
Reference in New Issue
Block a user