Skip to content

Commit

Permalink
Update shuttle-hq#4
Browse files Browse the repository at this point in the history
  • Loading branch information
shiraazAh committed Sep 10, 2024
1 parent b11cc6d commit cf0478c
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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"


3 changes: 3 additions & 0 deletions test-main/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
/target
.shuttle-storage
Secrets*.toml
10 changes: 10 additions & 0 deletions test-main/Cargo.toml
Original file line number Diff line number Diff line change
@@ -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"
16 changes: 16 additions & 0 deletions test-main/src/main.rs
Original file line number Diff line number Diff line change
@@ -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<impl FnOnce(&mut ServiceConfig) + Send + Clone + 'static> {
let config = move |cfg: &mut ServiceConfig| {
cfg.service(hello_world);
};

Ok(config.into())
}

0 comments on commit cf0478c

Please sign in to comment.