19 lines
669 B
Rust
19 lines
669 B
Rust
use gateway::{Backends, GatewayConfig};
|
|
#[tokio::main]
|
|
async fn main() -> Result<(), Box<dyn std::error::Error>> {
|
|
tracing_subscriber::fmt()
|
|
.with_env_filter(
|
|
tracing_subscriber::EnvFilter::try_from_default_env()
|
|
.unwrap_or_else(|_| tracing_subscriber::EnvFilter::new("info")),
|
|
)
|
|
.init();
|
|
let config = GatewayConfig::from_env();
|
|
let backends = Backends::remote(&config.auth_endpoint, &config.game_endpoint);
|
|
tracing::info!(
|
|
auth = %config.auth_endpoint,
|
|
game = %config.game_endpoint,
|
|
"gateway backends configured"
|
|
);
|
|
gateway::run(config, backends).await?;
|
|
Ok(())
|
|
}
|