feat: support gracefully shutdown server

This commit is contained in:
sigoden
2022-06-03 10:59:54 +08:00
parent 4167e5c07e
commit c3dd0f0ec5
3 changed files with 73 additions and 44 deletions

View File

@@ -14,7 +14,7 @@ keywords = ["static", "file", "server", "http", "cli"]
[dependencies]
clap = { version = "3", default-features = false, features = ["std", "cargo"] }
chrono = "0.4"
tokio = { version = "1", features = ["rt-multi-thread", "macros", "fs", "io-util"]}
tokio = { version = "1", features = ["rt-multi-thread", "macros", "fs", "io-util", "signal"]}
tokio-rustls = "0.23"
tokio-stream = { version = "0.1", features = ["net"] }
tokio-util = { version = "0.7", features = ["codec", "io-util"] }