Skip to content

A boilerplate web app using axum, htmx, and tera (for templating). Demonstrates how these technologies can be used in tandem.

Notifications You must be signed in to change notification settings

danwritecode/rust-axum-htmx-tailwind

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Rust/Axum/Htmx/AlpineJs/Tera/Tailwind Web Dev Yeehaw

To Build Javascript Dependencies (Htmx and Alpine Js)

npm install
npm run build

esbuild is used to bundle all dependencies. Dependencies can be added to app.js and they will be bundle automatically.

For Tailwind CSS Purging/Watching:

npx tailwindcss -i ./ui/assets/tailwind.css -o ./dist/output.css --watch

For Hot Reloading

  1. Install cargo watch watchtower
  2. Run
cargo watch -x run

Templating with Tera

The templating engine used is Tera. It looks similar to Jinja, supports the injection of common components (nav, footer, etc), and supports componentization through the use of macros.

Docs can be found here.

About

A boilerplate web app using axum, htmx, and tera (for templating). Demonstrates how these technologies can be used in tandem.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published