blog/backend/src/main.rs
SquidSpirit 98a9ecfd86
All checks were successful
Frontend CI / build (push) Successful in 1m30s
BLOG-43 init: actix-web project
2025-05-05 01:08:56 +08:00

10 lines
261 B
Rust

use actix_web::{App, HttpResponse, HttpServer, web};
#[actix_web::main]
async fn main() -> std::io::Result<()> {
HttpServer::new(|| App::new().route("/", web::get().to(HttpResponse::Ok)))
.bind(("127.0.0.1", 8080))?
.run()
.await
}