Skip to content

Commit

Permalink
Publish rwf-admin (#39)
Browse files Browse the repository at this point in the history
  • Loading branch information
levkk authored Nov 22, 2024
1 parent 7fa1c4d commit d5217fc
Show file tree
Hide file tree
Showing 5 changed files with 50 additions and 9 deletions.
6 changes: 3 additions & 3 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 10 additions & 3 deletions rwf-admin/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,13 +1,20 @@
[package]
name = "rwf-admin"
version = "0.1.10"
version = "0.1.11"
edition = "2021"
include = ["/templates"]
license = "MIT"
description = "Admin panel for applications written with the Rust Web Framework"
homepage = "https://levkk.github.io/rwf/"
repository = "https://github.com/levkk/rwf"
keywords = ["mvc", "web", "framework", "admin"]
authors = ["Lev Kokotov <[email protected]>"]
include = ["/templates", "/src", "/static"]
readme = "README.md"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
rwf = { path = "../rwf", version = ">=0.1" }
rwf = { path = "../rwf", version = ">=0.1.11" }
tokio = { version = "1", features = ["full"] }
serde = { version = "1", features = ["derive"] }
serde_json = "1"
Expand Down
34 changes: 34 additions & 0 deletions rwf-admin/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# Rwf admin

[![Documentation](https://img.shields.io/badge/documentation-blue?style=flat)](https://levkk.github.io/rwf/)
[![Latest crate](https://img.shields.io/crates/v/rwf-admin.svg)](https://crates.io/crates/rwf-admin)
[![Reference docs](https://img.shields.io/docsrs/rwf-admin)](https://docs.rs/rwf/latest/rwf-admin/)

[Rwf](https://crates.io/crates/rwf) admin panel is a web application that provides a real time overview into web activity, background jobs queue insights, and allows to manipulate database models.

The admin panel can run as a standalone application or be integrated into an existing Rwf application.

## Installation

To install Rwf admin panel into your application, you need to add it to your routes and preload its templates at application startup:

```rust
use rwf::prelude::*;
use rwf::http::{Server, Error};

#[tokio::main]
async fn main() -> Result<(), Error> {
rwf_admin::install()?;

let mut routes = vec![];
// Add your routes...

routes.extend(rwf_admin::routes());

Server::new(routes)
.launch("0.0.0.0:8000")
.await
}
```

The admin panel is now running on [https://localhost:8000/admin/](https://localhost:8000/admin/).
2 changes: 1 addition & 1 deletion rwf-macros/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "rwf-macros"
version = "0.1.8"
version = "0.1.11"
edition = "2021"
license = "MIT"
description = "Macros for the Rust Web Framework"
Expand Down
4 changes: 2 additions & 2 deletions rwf/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "rwf"
version = "0.1.10"
version = "0.1.11"
edition = "2021"
license = "MIT"
description = "Framework for building web applications in the Rust programming language"
Expand Down Expand Up @@ -32,7 +32,7 @@ parking_lot = "0.12"
once_cell = "1"
tracing = "0.1"
tracing-subscriber = { version = "0.3", features = ["env-filter"] }
rwf-macros = { path = "../rwf-macros", version = "0.1.8" }
rwf-macros = { path = "../rwf-macros", version = "0.1.11" }
colored = "2"
serde = { version = "1", features = ["derive"] }
serde_json = "1"
Expand Down

0 comments on commit d5217fc

Please sign in to comment.