use actix_web::{App, get, HttpResponse, HttpServer, Responder}; mod util; #[actix_web::main] async fn main() -> std::io::Result<()> { util::print_copyright_notice(); let port = 8000; let bind_addr = "127.0.0.1"; util::notice_println(format!("Starting server on {}:{}", bind_addr, port)); HttpServer::new(|| App::new().service(hello)) .bind((bind_addr, port))? .run() .await } #[get("/")] async fn hello() -> impl Responder { HttpResponse::Ok().body("Hello World!") }