Quick Start
adjust is a library for building backend services on top of axum. It includes:
Controllers
Fast service initialization (in just a few lines) without hassle
Automatic
AppState
setupBuilt-in support for
Postgres
(via Diesel) andRedis
Cookie manager (with the
cookie
feature)Out-of-the-box integration with
tokio
andserde
Example
// use ...;
#[derive(Clone)
struct AppState {
postgres: Pool<Postgres>,
redis: Pool<Redis>
}
#[adjust::main]
async fn main() -> Service<AppState> {
Service {
name: "Example Service",
controllers: controllers![OpenApiController, OAuthController, OpenIDController],
..Default::default()
}
}
Last updated