No description
Find a file
JMARyA 1f77f4efdc
All checks were successful
ci/woodpecker/push/test Pipeline was successful
🚑️ fix
2025-03-04 22:08:28 +01:00
.woodpecker nightly 2024-12-18 19:58:33 +01:00
examples finalize ui 2025-02-18 18:29:13 +01:00
src 🚑️ fix 2025-03-04 22:08:28 +01:00
.gitignore ogp 2025-02-23 22:52:19 +01:00
build.rs finalize ui 2025-02-18 18:29:13 +01:00
Cargo.lock file responses 2025-03-04 18:47:55 +01:00
Cargo.toml file responses 2025-03-04 18:47:55 +01:00
README.md user update 2024-12-27 03:56:27 +01:00

Based

Based is a micro framework providing web dev primitives.

Features

  • User Auth
  • PostgresDB Connection
  • Logging
  • Request Contexts
  • Templates (Shell)

User Auth

To use the user auth feature, make sure a migration has added these tables to your PostgresDB:

HTMX

Based has a route for serving HTMX at based::htmx::htmx_script_route which you can include in your rocket routes!. The HTMX script will be available at /assets/htmx.min.js.

Additionally you can check if a requests originates from HTMX:

#[get("/")]
pub async fn index(ctx: RequestContext) -> StringRespopnse {
    if ctx.is_htmx {
        ...
    } else {
        ...
    }
}