A simple template using Axum and Tailwind to speed up your Rust development. Deploy-ready with a Dockerfile so that you can host this anywhere you can a container.
No Node/npm needed!
Comes with a configured Github CI, Dependabot, server telemetry, and basic tests.
Important
You'll need to download and install the following to begin working:
- Install and config the Tailwindcss cli.
- Install cargo-watch:
cargo install cargo-watch
- Install just
Make it your own:
- Update the package name in the
Cargo.toml
- Update the
Dockerfile
with that same name - Update the site name and description in
templates/base.html
- Find and replace all instances in the source code of 'axum_tailwind_template' with your package name.
- Update this
README.md
!
Included is a bash script in a justfile
that can be run with:
just dev
This will start the Axum server and Tailwind binary in watch modes so that saves will trigger rebuilds while you're developing. On exiting this process, the Tailwind binary will minify its outputted css.
- Run:
just build-tailwind
- Or as developing, in another tab run:
just run-tailwind
to automatically compile the tailwind as you're making changes.
Also included in the justfile
is:
just update
which will update dependancies and then run the tests.