summaryrefslogtreecommitdiff
path: root/src/main.rs
blob: 594491f1a9f020de89805cdf84cbf35fd6ef0b7f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
use actix_web::{web, App, HttpResponse, HttpServer};
#[actix_rt::main]
async fn main() -> std::io::Result<()> {
    HttpServer::new(|| {
        App::new().service(
            web::resource("/")
                .to(|| HttpResponse::Ok().body("Hello from Rust!")),
        )
    })
    .bind("127.0.0.1:8080")?
    .run()
    .await
}