Working through Server-Driven Web Apps with htmx using Rust
cargo watch -c -x run
Then browse to http://localhost:3000
### Chapter 1
First part of "Jumping in" is in main.rs
and also tagged as p01-hello-world
in this repo.
The second part of chapter 1, "Creating a CRUD application", is in dogs.rs
(and .html
, and .css
) files. Tagged here as p02-crud
.
"Developing endponts", follows the patterm of a module, html page with names to match the sections:
- "oob" (
oob.html
,oob/mod.rs
) for the "Performing Out-of-Band Swaps" - "triggers" for the event triggers.
- the "dogs" example was updated in this chapter to support update.
Taggeg in git as ch-3
.
apps
are:
- "lazy" for lazy loading.
- "validate" for input validation. Note that the online example is considerably more involved that the example in the book.
- "pagination" for a version of the next/previous example.
- "infiniscroll", for infinite scroll variation on pagination.
- https://docs.rs/axum/latest/axum/index.html — a Rust web server.
- https://maud.lambda.xyz — compile-time HTML templates.