Skip to content

Commit

Permalink
mx-cloud 404 handling
Browse files Browse the repository at this point in the history
  • Loading branch information
oscartbeaumont committed Sep 13, 2024
1 parent 72a7e36 commit 376bc6a
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
3 changes: 2 additions & 1 deletion apps/cloud/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ use axum::{
Router,
};
use rcgen::{Certificate, CertificateParams, KeyPair};
use reqwest::StatusCode;
use tower_http::trace::TraceLayer;
use tracing::{info_span, Span};

Expand Down Expand Up @@ -107,7 +108,7 @@ impl Context {
}),
)
.route_layer(middleware::from_fn(headers))
// TODO: 404 handler
.fallback(|| async move { (StatusCode::NOT_FOUND, "404: Not Found") })
}
}

Expand Down
11 changes: 11 additions & 0 deletions sst.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,17 @@ export default $config({
},
});

new command.local.Command(
"todo",
{
create:
"echo 'ITS IS DONE' && ls target/lambda && ls target/lambda/lambda",
},
{
dependsOn: [cloudBuild],
},
);

const cloudFunction = new sst.aws.Function(
"cloud",
{
Expand Down

0 comments on commit 376bc6a

Please sign in to comment.