use mail_app::configuration::get_configuration; use mail_app::startup::run; use std::net::TcpListener; #[tokio::main] async fn main() -> Result<(), std::io::Error> { let configuration = get_configuration().expect("Failed to read config"); let address = format!("127.0.0.1:{}", configuration.application_port); let listener = TcpListener::bind(address)?; run(listener)?.await }