This example shows how to serve static assets using axum and shuttle.
This example is inspired by the static-file-server example from the axum repo, to see more ways to do this check out the original.
cargo add sqlx cargo sqlx prepare
cargo shuttle run cargo shuttle project start cargo shuttle deploy --allow-dirty cargo shuttle run cargo shuttle run --external cargo shuttle run --external --port 8123
cargo add tower-livereload
let mut router = /* ... */;
if cfg!(debug_assertions) {
router = router.layer(tower_livereload::LiveReloadLayer::new());
}
cargo shuttle project start --idle-minutes 90 cargo shuttle project status RUST_LOG=cargo_shuttle cargo shuttle deploy