Skip to content

Commit

Permalink
Update to axum 0.7 and handlebars 5
Browse files Browse the repository at this point in the history
  • Loading branch information
sitegui committed Jun 26, 2024
1 parent 96276a5 commit c8ef181
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 7 deletions.
6 changes: 3 additions & 3 deletions feattle-ui/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,19 +13,19 @@ categories = ["config", "data-structures", "development-tools", "web-programming
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
axum = { version = "0.6.16", optional = true, default-features = false, features = ["form", "json"] }
axum = { version = "0.7.5", optional = true, default-features = false, features = ["form", "json"] }
chrono = { version = "0.4.15", features = ["serde"] }
feattle-core = { path = "../feattle-core", version = "1.0.0" }
futures = "0.3.5"
handlebars = "4.1.2"
handlebars = "5.1.2"
log = "0.4.11"
serde = { version = "1.0.115", features = ["derive"] }
serde_json = "1.0.57"
thiserror = "1.0.20"
warp = { version = "0.3.0", optional = true }

[dev-dependencies]
axum = { version = "0.6.16", features = ["tokio"] }
axum = { version = "0.7.5", features = ["tokio"] }
tokio = { version = "1.4.0", features = ["macros", "rt"] }

[package.metadata.docs.rs]
Expand Down
4 changes: 2 additions & 2 deletions feattle/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,10 @@ feattle-ui = { path = "../feattle-ui", version = "1.0.0" }

[dev-dependencies]
aws-config = { version = "1.5.3", features = ["behavior-version-latest"] }
axum = { version = "0.6.16", features = ["tokio"] }
axum = { version = "0.7.5", features = ["tokio"] }
chrono = { version = "0.4.15", features = ["serde"] }
dotenv = "0.15.0"
env_logger = "0.10.0"
env_logger = "0.11.3"
rusoto_core = { version = "0.48.0" }
rusoto_s3 = { version = "0.48.0" }
serde = { version = "1.0.115", features = ["derive"] }
Expand Down
6 changes: 4 additions & 2 deletions feattle/examples/full.rs
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
use axum::Server;
use feattle::*;
use std::collections::BTreeMap;
use std::env;
use std::error::Error;
use std::future::IntoFuture;
use std::sync::Arc;
use tokio::net::TcpListener;
use tokio::time::Duration;
use uuid::Uuid;

Expand Down Expand Up @@ -92,7 +93,8 @@ async fn main() -> Result<(), Box<dyn Error>> {

// Serve the admin panel with `axum`
let router = axum_router(panel);
tokio::spawn(Server::bind(&([127, 0, 0, 1], 3031).into()).serve(router.into_make_service()));
let listener = TcpListener::bind(("127.0.0.1", 3031)).await?;
tokio::spawn(axum::serve(listener, router.into_make_service()).into_future());

println!("Admin UI available in http://127.0.0.1:3030");

Expand Down

0 comments on commit c8ef181

Please sign in to comment.