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
}
Emiliano Maldonado Garza Wilovy09
🐧
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.
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.