- update: service port env variable to just be named service_port
This commit is contained in:
@@ -8,12 +8,10 @@ use crate::character_db_client::CharacterDbClient;
|
||||
use crate::character_service::character::character_service_server::CharacterServiceServer;
|
||||
use crate::character_service::MyCharacterService;
|
||||
use dotenv::dotenv;
|
||||
use std::collections::HashMap;
|
||||
use std::env;
|
||||
use std::str::FromStr;
|
||||
use std::sync::Arc;
|
||||
use tracing::Level;
|
||||
use utils::consul_registration;
|
||||
use utils::service_discovery::{get_kube_service_endpoints_by_dns};
|
||||
|
||||
#[tokio::main]
|
||||
@@ -28,7 +26,7 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> {
|
||||
|
||||
// Set the gRPC server address
|
||||
let addr = env::var("LISTEN_ADDR").unwrap_or_else(|_| "0.0.0.0".to_string());
|
||||
let port = env::var("CHARACTER_SERVICE_PORT").unwrap_or_else(|_| "50053".to_string());
|
||||
let port = env::var("SERVICE_PORT").unwrap_or_else(|_| "50053".to_string());
|
||||
let db_url = format!("http://{}",get_kube_service_endpoints_by_dns("database-service","tcp","database-service").await?.get(0).unwrap());
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user