scroll.server/crates/gateway/src/main.rs
WiseDev d25a6de423 move all crates into crates/, glob members
pure move, no code touched. readme and protocol.md paths fixed up.
2026-08-23 08:15:45 +03:00

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(())
}