use actix_web::{web, get, App, HttpServer,
Responder, HttpResponse};
#[get("/")]
async fn hello_world() -> HttpResponse {
HttpResponse::Ok().json("Hello, World")
}
#[actix_web::main]
async fn main() -> std::io::Result<()> {
HttpServer::new(|| {
App::new()
.service(hello_world)
})
.bind("127.0.0.1:8080")?
.run()
.await
}
🐧
I want to learn how to use TS/Rust, really know how to use it in a good way.
Self-taught dev, fullstack lover and interested in the blockchain world.
- Mexico
-
21:06
(UTC -06:00) - https://www.wilovy.com
- https://rustlang-es.org/
Highlights
- Pro
Something went wrong, please refresh the page to try again.
If the problem persists, check the GitHub status page or contact support.
If the problem persists, check the GitHub status page or contact support.