This example shows how you can make a custom Shuttle resource annotation.
pdo
), and outputs the value that you pass into the “name” attribute for the resource.
We are using the Axum framework in main.rs
so we can showcase the resource in action, but the implementation is entirely separate from what web framework you use so you can add your custom resource to any Shuttle-hosted resource.
You can clone the example below by running the following (you’ll need shuttle
CLI installed):