Appearance
Day 22 - Web开发
actix-web
rust
use actix_web::{web, App, HttpResponse};
async fn hello() -> HttpResponse {
HttpResponse::Ok().body("Hello, Rust!")
}
#[actix_web::main]
async fn main() -> std::io::Result<()> {
HttpServer::new(|| {
App::new()
.route("/", web::get().to(hello))
})
.bind("127.0.0.1:8080")?
.run()
.await
}📅 学习进度
| Day | 主题 | 状态 |
|---|---|---|
| 01-21 | 基础 | ✅ |
| 22 | Web开发 | ✅ |
| 23 | 数据库 | ⬜ |
