From ba71651782422d865d9a7887f504fcf0232fd0fa Mon Sep 17 00:00:00 2001 From: Muriel Paraire <72733662+MurielParaire@users.noreply.github.com> Date: Thu, 30 May 2024 21:27:07 +0200 Subject: [PATCH] fix(cli): add default for Server config Signed-off-by: Muriel Paraire <72733662+MurielParaire@users.noreply.github.com> --- src/shared-models/src/lib.rs | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/shared-models/src/lib.rs b/src/shared-models/src/lib.rs index b90c42a..503c297 100644 --- a/src/shared-models/src/lib.rs +++ b/src/shared-models/src/lib.rs @@ -44,12 +44,22 @@ pub struct CloudletShutdownResponse { pub success: bool, } -#[derive(Serialize, Deserialize, Debug, Default)] +#[derive(Serialize, Deserialize, Debug)] pub struct ServerConfig { pub address: String, pub port: u16, } +impl Default for ServerConfig { + fn default() -> Self { + ServerConfig { + address: String::from("localhost"), + port: 50051 + } + + } +} + #[derive(Serialize, Deserialize, Debug)] pub struct BuildConfig { #[serde(rename = "source-code-path")]