This article walks you through setting up static files with Axum, a powerful Rust framework maintained by the Tokio-rs team.
/
where the homepage is served and shows you how you can serve HTML or other types of files with Actix Web.
Note that build assets are declared in Shuttle.toml
.
You can clone the example below by running the following (you’ll need shuttle
CLI installed):
shuttle run
then visit the home route at http://localhost:8000
- you should see a homepage that shows our included HTML file.
You can extend this example by adding more routes that serve other files.