HttpServer::new(move || { App::new() .service( SwaggerUi::new("/swagger-ui/{_:.*}") .url("/api-docs/openapi.json", ApiDoc::openapi()), ) }) .bind((Ipv4Addr::UNSPECIFIED, 8000)).unwrap() .run();