generated from alecodes/base-template
feat: add basic htmx example
This commit is contained in:
parent
17bf419074
commit
ffca6175c0
6 changed files with 80 additions and 25 deletions
|
|
@ -1,6 +1,7 @@
|
|||
#![allow(unused)]
|
||||
#![allow(dead_code)]
|
||||
|
||||
use axum_htmx::AutoVaryLayer;
|
||||
use compendium::{router, AppState, Error, Link, Result, Tx};
|
||||
use minijinja::{Environment, Value};
|
||||
use sqlx::postgres::PgPoolOptions;
|
||||
|
|
@ -78,6 +79,7 @@ async fn main() -> Result<()> {
|
|||
let app = router::new()
|
||||
.layer(TraceLayer::new_for_http().on_request(()))
|
||||
.layer(tx_layer)
|
||||
.layer(AutoVaryLayer)
|
||||
.with_state(AppState::new(tmpl_env, tx_state));
|
||||
|
||||
// Add hot reload only on dev mode
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue