diff options
-rw-r--r-- | src/config.rs | 4 | ||||
-rw-r--r-- | src/main.rs | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/src/config.rs b/src/config.rs index 4b333fe..2e9c1eb 100644 --- a/src/config.rs +++ b/src/config.rs | |||
@@ -6,7 +6,7 @@ use crate::auth; | |||
6 | #[derive(Debug, Clone, Deserialize)] | 6 | #[derive(Debug, Clone, Deserialize)] |
7 | #[serde(default)] | 7 | #[serde(default)] |
8 | pub struct Config { | 8 | pub struct Config { |
9 | pub serveraddr: String, | 9 | pub addr: String, |
10 | pub pingtimeout: i64, | 10 | pub pingtimeout: i64, |
11 | pub pingthreshold: u64, | 11 | pub pingthreshold: u64, |
12 | pub auth: Auth, | 12 | pub auth: Auth, |
@@ -15,7 +15,7 @@ pub struct Config { | |||
15 | impl Default for Config { | 15 | impl Default for Config { |
16 | fn default() -> Self { | 16 | fn default() -> Self { |
17 | Self { | 17 | Self { |
18 | serveraddr: "0.0.0.0:7229".to_string(), | 18 | addr: "0.0.0.0:7229".to_string(), |
19 | pingtimeout: 10, | 19 | pingtimeout: 10, |
20 | pingthreshold: 1, | 20 | pingthreshold: 1, |
21 | auth: Default::default(), | 21 | auth: Default::default(), |
diff --git a/src/main.rs b/src/main.rs index b550dd8..352023b 100644 --- a/src/main.rs +++ b/src/main.rs | |||
@@ -118,7 +118,7 @@ async fn main() -> color_eyre::eyre::Result<()> { | |||
118 | .merge(SwaggerUi::new("/swagger-ui").url("/api-docs/openapi.json", ApiDoc::openapi())) | 118 | .merge(SwaggerUi::new("/swagger-ui").url("/api-docs/openapi.json", ApiDoc::openapi())) |
119 | .with_state(Arc::new(shared_state)); | 119 | .with_state(Arc::new(shared_state)); |
120 | 120 | ||
121 | let addr = config.serveraddr; | 121 | let addr = config.addr; |
122 | info!("start server on {}", addr); | 122 | info!("start server on {}", addr); |
123 | let listener = tokio::net::TcpListener::bind(addr).await?; | 123 | let listener = tokio::net::TcpListener::bind(addr).await?; |
124 | axum::serve(listener, app).await?; | 124 | axum::serve(listener, app).await?; |