Skip to content

Commit

Permalink
fix(tutorial): make the axum tutorial use javascript by default
Browse files Browse the repository at this point in the history
  • Loading branch information
yaleman committed Jan 3, 2025
1 parent 3fd5591 commit 4b7f887
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
10 changes: 7 additions & 3 deletions tutorial/server/axum/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@
name = "axum_tutorial"
version = "0.1.0"
edition = "2021"
authors = ["William Brown <william@blackhats.net.au>, Ben Wishovich <ben@benw.is>"]
authors = [
"William Brown <william@blackhats.net.au>, Ben Wishovich <ben@benw.is>",
]
license = "MPL-2.0"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
Expand All @@ -11,7 +13,9 @@ license = "MPL-2.0"
tracing.workspace = true
tracing-subscriber.workspace = true
serde.workspace = true
webauthn-rs = { workspace = true, features = ["danger-allow-state-serialisation"] }
webauthn-rs = { workspace = true, features = [
"danger-allow-state-serialisation",
] }
axum = { version = "0.7" }
tokio = { workspace = true, features = ["full"] }
uuid = { workspace = true, features = ["v4"] }
Expand All @@ -22,6 +26,6 @@ tower-http = { version = "0.6", features = ["fs"] }
tower-sessions = "0.13"

[features]
default = ["wasm"]
default = ["javascript"]
wasm = []
javascript = []
4 changes: 3 additions & 1 deletion tutorial/server/axum/src/main.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
use axum::{extract::Extension, http::StatusCode, response::IntoResponse, routing::post, Router};
use std::{net::SocketAddr, path::PathBuf};
use std::net::SocketAddr;
#[cfg(feature = "wasm")]
use std::path::PathBuf;
use tower_sessions::{
cookie::{time::Duration, SameSite},
Expiry, MemoryStore, SessionManagerLayer,
Expand Down

0 comments on commit 4b7f887

Please sign in to comment.