mirror of
https://github.com/actix/examples
synced 2024-11-23 22:41:07 +01:00
chore: fix comment
This commit is contained in:
parent
7f20870e0f
commit
bd45c20874
@ -53,11 +53,12 @@ async fn main() -> eyre::Result<()> {
|
|||||||
//
|
//
|
||||||
// loop reloads on TLS changes and exits on normal ctrl-c (etc.) signals
|
// loop reloads on TLS changes and exits on normal ctrl-c (etc.) signals
|
||||||
loop {
|
loop {
|
||||||
// load TLS cert/key files and
|
// load TLS cert/key files
|
||||||
let config = load_rustls_config()?;
|
let config = load_rustls_config()?;
|
||||||
|
|
||||||
log::info!("starting HTTPS server at https://localhost:8443");
|
log::info!("starting HTTPS server at https://localhost:8443");
|
||||||
|
|
||||||
|
// start running server but don't await it
|
||||||
let mut server = HttpServer::new(|| {
|
let mut server = HttpServer::new(|| {
|
||||||
App::new()
|
App::new()
|
||||||
.service(web::resource("/").to(index))
|
.service(web::resource("/").to(index))
|
||||||
@ -67,6 +68,7 @@ async fn main() -> eyre::Result<()> {
|
|||||||
.bind_rustls_021("127.0.0.1:8443", config)?
|
.bind_rustls_021("127.0.0.1:8443", config)?
|
||||||
.run();
|
.run();
|
||||||
|
|
||||||
|
// server handle to send signals
|
||||||
let server_hnd = server.handle();
|
let server_hnd = server.handle();
|
||||||
|
|
||||||
tokio::select! {
|
tokio::select! {
|
||||||
|
Loading…
Reference in New Issue
Block a user