print url on start
upgrade to aykroyd v0.3
304 for etag match on assets
This application showcases the so-called Triple-A stack for Rust web development: Axum, Askama, and Aykroyd. Axum is the web framework, fielding requests, routing them, and managing responses. Askama is the templating engine, turning our Rust data structures into HTML markup. Aykroyd is the ORM layer, making it easy to query Postgres to load and save our Rust data structures.
The template files are in the directory templates
. Under this
directory you'll find the main index.html
template as well as each
of the partials.
The templates are parsed by Askama at compile time. The derive macros
used in src/view.rs
bring in the templates and bind them to data.
The PostgreSQL queries are located in the file src/db/query.rs
. The
derived macros used there bind each query to the input parameters and
the output row. The output rows themselves are located in src/model.rs
.
The various HTTP routes are defined under the directory src/routes
.
Each handler retrieves a database connection from the application state,
performs whatever actions are appropriate, then loads and returns the
view appropriate for the request context.