Rust actix 4 deploy fails without logs

Trying to create a rust web server using actix-4, but the deploy alwats fails without any logs…

The code is the same provided by the actix example

use actix_web::{get, post, web, App, HttpResponse, HttpServer, Responder};

#[get("/")]
async fn hello() -> impl Responder {
    HttpResponse::Ok().body("Hello world!")
}

#[post("/echo")]
async fn echo(req_body: String) -> impl Responder {
    HttpResponse::Ok().body(req_body)
}

async fn manual_hello() -> impl Responder {
    HttpResponse::Ok().body("Hey there!")
}

#[actix_web::main]
async fn main() -> std::io::Result<()> {
    HttpServer::new(|| {
        App::new()
            .service(hello)
            .service(echo)
            .route("/hey", web::get().to(manual_hello))
    })
    .bind(("0.0.0.0", 8080))?
    .run()
    .await
}

Hi there,

Happy to take a closer look, can you let me know the name of the service having trouble? Also, is this the example you are referring to https://render.com/docs/deploy-actix-todo?

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.