Files
OpenFUT/openfut-utas-host/src/main.rs
T
2026-08-18 17:29:24 +00:00

33 lines
1.1 KiB
Rust

//! FIFA 17 UTAS migration host entrypoint.
//!
//! Serves migrated FIFA 17 UTAS routes from Rust/Core and proxies only the
//! remaining tail to the Python oracle. Config is env-only (see
//! [`openfut_utas_host::config`]).
use openfut_utas_host::{config::HostConfig, Server};
fn main() {
let cfg = match HostConfig::from_env() {
Ok(c) => c,
Err(e) => {
eprintln!("utas-host config error: {e}");
std::process::exit(2);
}
};
eprintln!(
"utas-host starting: listen={} python_upstream={} core_url={} tables_dir={} catalog={} identity_store={} account={} persona_id={}",
cfg.listen_addr, cfg.python_upstream, cfg.core_url, cfg.tables_dir, cfg.catalog_path, cfg.identity_store_path, cfg.account_path, cfg.persona_id
);
let server = match Server::from_config(&cfg) {
Ok(s) => s,
Err(e) => {
eprintln!("utas-host startup error: {e}");
std::process::exit(1);
}
};
if let Err(e) = server.serve(&cfg.listen_addr) {
eprintln!("utas-host serve error: {e}");
std::process::exit(1);
}
}