quokka-admin 0.1.0

An admin panel for quokka
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
use quokka::state::{Commands, Database, ProvideState, State, Templating};
use quokka_admin::{state::AdminState, AdminBundle};

#[derive(Clone, State, ProvideState)]
pub struct CliState {
    templating: Templating,
    database: Database,
    admin: AdminState<Self>,
    commands: Commands<Self>,
}

#[tokio::main]
async fn main() -> quokka::Result<()> {
    quokka::Quokka::<CliState>::try_default()?
        .load::<AdminBundle>()?
        .execute_command()
        .await
}