From cf0478c3fe48873a53f6de3a558bd9612c32cd14 Mon Sep 17 00:00:00 2001 From: Shiraaz Ahammed Date: Tue, 10 Sep 2024 19:01:09 +0100 Subject: [PATCH] Update #4 --- .github/workflows/ci.yml | 2 +- test-main/.gitignore | 3 +++ test-main/Cargo.toml | 10 ++++++++++ test-main/src/main.rs | 16 ++++++++++++++++ 4 files changed, 30 insertions(+), 1 deletion(-) create mode 100644 test-main/.gitignore create mode 100644 test-main/Cargo.toml create mode 100644 test-main/src/main.rs diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 28aa1a7a..13fa6b6c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -21,6 +21,6 @@ jobs: - uses: shuttle-hq/deploy-action@main with: deploy-key: ${{ secrets.SHUTTLE_API_KEY }} - working-directory: "actix-web/hello-world" + working-directory: "test-main" diff --git a/test-main/.gitignore b/test-main/.gitignore new file mode 100644 index 00000000..e8541fe9 --- /dev/null +++ b/test-main/.gitignore @@ -0,0 +1,3 @@ +/target +.shuttle-storage +Secrets*.toml diff --git a/test-main/Cargo.toml b/test-main/Cargo.toml new file mode 100644 index 00000000..b7f0a1a5 --- /dev/null +++ b/test-main/Cargo.toml @@ -0,0 +1,10 @@ +[package] +name = "test-main" +version = "0.1.0" +edition = "2021" + +[dependencies] +actix-web = "4.3.1" +shuttle-actix-web = "0.47.0" +shuttle-runtime = "0.47.0" +tokio = "1.26.0" diff --git a/test-main/src/main.rs b/test-main/src/main.rs new file mode 100644 index 00000000..fe1e7f33 --- /dev/null +++ b/test-main/src/main.rs @@ -0,0 +1,16 @@ +use actix_web::{get, web::ServiceConfig}; +use shuttle_actix_web::ShuttleActixWeb; + +#[get("/")] +async fn hello_world() -> &'static str { + "Hello World!" +} + +#[shuttle_runtime::main] +async fn main() -> ShuttleActixWeb { + let config = move |cfg: &mut ServiceConfig| { + cfg.service(hello_world); + }; + + Ok(config.into()) +}