diff --git a/rust-connector-sdk/src/default_main.rs b/rust-connector-sdk/src/default_main.rs index a01e8bf4..b32ed25a 100644 --- a/rust-connector-sdk/src/default_main.rs +++ b/rust-connector-sdk/src/default_main.rs @@ -56,6 +56,13 @@ struct ServeCommand { configuration: PathBuf, #[arg(long, value_name = "ENDPOINT", env = "OTEL_EXPORTER_OTLP_ENDPOINT")] otlp_endpoint: Option, + #[arg( + long, + value_name = "HOST IP", + env = "HASURA_CONNECTOR_HOST", + default_value_t = net::IpAddr::V4(net::Ipv4Addr::UNSPECIFIED), + )] + host: net::IpAddr, #[arg( long, value_name = "PORT", @@ -67,8 +74,6 @@ struct ServeCommand { service_token_secret: Option, #[arg(long, value_name = "NAME", env = "OTEL_SERVICE_NAME")] service_name: Option, - #[arg(long, env = "HASURA_ENABLE_V2_COMPATIBILITY")] - enable_v2_compatibility: bool, } #[derive(Clone, Parser)] @@ -233,11 +238,8 @@ where serve_command.service_token_secret.clone(), ); - let port = serve_command.port; - let address = net::SocketAddr::new(net::IpAddr::V4(net::Ipv4Addr::UNSPECIFIED), port); - + let address = net::SocketAddr::new(serve_command.host, serve_command.port); println!("Starting server on {}", address); - axum::Server::bind(&address) .serve(router.into_make_service()) .with_graceful_shutdown(async {