mirror of
https://github.com/actix/examples
synced 2025-06-26 17:17:42 +02:00
docs: improve docs about tokio::main
This commit is contained in:
@ -18,6 +18,7 @@ async fn echo_ws(req: HttpRequest, stream: web::Payload) -> Result<HttpResponse,
|
||||
ws::start(MyWebSocket::new(), &req, stream)
|
||||
}
|
||||
|
||||
// the actor-based WebSocket examples REQUIRE `actix_web::main` for actor support
|
||||
#[actix_web::main]
|
||||
async fn main() -> std::io::Result<()> {
|
||||
env_logger::init_from_env(env_logger::Env::new().default_filter_or("info"));
|
||||
|
Reference in New Issue
Block a user