diff --git a/examples/angular-todomvc/src/main.rs b/examples/angular-todomvc/src/main.rs index 8e93061e..6f84a39f 100644 --- a/examples/angular-todomvc/src/main.rs +++ b/examples/angular-todomvc/src/main.rs @@ -59,7 +59,7 @@ async fn main() -> Result<(), Box> { }); let app = axum::Router::new() - .nest_service("/", ServeDir::new("dist")) + .fallback_service(ServeDir::new("dist")) .layer( ServiceBuilder::new() .layer(CorsLayer::permissive()) // Enable CORS policy diff --git a/examples/basic-crud-application/src/main.rs b/examples/basic-crud-application/src/main.rs index bfd4c0ce..341211dc 100644 --- a/examples/basic-crud-application/src/main.rs +++ b/examples/basic-crud-application/src/main.rs @@ -29,7 +29,7 @@ async fn main() -> Result<(), Box> { }); let app = axum::Router::new() - .nest_service("/", ServeDir::new("dist")) + .fallback_service(ServeDir::new("dist")) .layer( ServiceBuilder::new() .layer(CorsLayer::permissive()) // Enable CORS policy diff --git a/examples/private-messaging/src/main.rs b/examples/private-messaging/src/main.rs index 722fd190..a6839fe7 100644 --- a/examples/private-messaging/src/main.rs +++ b/examples/private-messaging/src/main.rs @@ -28,7 +28,7 @@ async fn main() -> Result<(), Box> { ); let app = axum::Router::new() - .nest_service("/", ServeDir::new("dist")) + .fallback_service(ServeDir::new("dist")) .layer( ServiceBuilder::new() .layer(CorsLayer::permissive()) // Enable CORS policy diff --git a/examples/redis-whiteboard/src/fred.rs b/examples/redis-whiteboard/src/fred.rs index 7bf14d84..99b39a66 100644 --- a/examples/redis-whiteboard/src/fred.rs +++ b/examples/redis-whiteboard/src/fred.rs @@ -52,7 +52,7 @@ async fn main() -> Result<(), Box> { io.ns("/", on_connect).await?; let app = axum::Router::new() - .nest_service("/", ServeDir::new("dist")) + .fallback_service(ServeDir::new("dist")) .layer( ServiceBuilder::new() .layer(CorsLayer::permissive()) // Enable CORS policy diff --git a/examples/redis-whiteboard/src/redis.rs b/examples/redis-whiteboard/src/redis.rs index e52d2693..f5bc69b5 100644 --- a/examples/redis-whiteboard/src/redis.rs +++ b/examples/redis-whiteboard/src/redis.rs @@ -8,8 +8,8 @@ use socketioxide::{ extract::{Data, SocketRef}, ParserConfig, SocketIo, }; -use socketioxide_redis::{RedisAdapter, RedisAdapterCtr}; use socketioxide_redis::drivers::redis::redis_client as redis; +use socketioxide_redis::{RedisAdapter, RedisAdapterCtr}; use tower::ServiceBuilder; use tower_http::{cors::CorsLayer, services::ServeDir}; use tracing::info; @@ -43,7 +43,7 @@ async fn main() -> Result<(), Box> { io.ns("/", on_connect).await?; let app = axum::Router::new() - .nest_service("/", ServeDir::new("dist")) + .fallback_service(ServeDir::new("dist")) .layer( ServiceBuilder::new() .layer(CorsLayer::permissive()) // Enable CORS policy diff --git a/examples/redis-whiteboard/src/redis_cluster.rs b/examples/redis-whiteboard/src/redis_cluster.rs index a14b7063..89711dd2 100644 --- a/examples/redis-whiteboard/src/redis_cluster.rs +++ b/examples/redis-whiteboard/src/redis_cluster.rs @@ -46,7 +46,7 @@ async fn main() -> Result<(), Box> { io.ns("/", on_connect).await?; let app = axum::Router::new() - .nest_service("/", ServeDir::new("dist")) + .fallback_service(ServeDir::new("dist")) .layer( ServiceBuilder::new() .layer(CorsLayer::permissive()) // Enable CORS policy diff --git a/examples/webrtc-node-app/src/main.rs b/examples/webrtc-node-app/src/main.rs index cabded63..e4560e77 100644 --- a/examples/webrtc-node-app/src/main.rs +++ b/examples/webrtc-node-app/src/main.rs @@ -108,7 +108,7 @@ async fn main() -> Result<(), Box> { }); let app = axum::Router::new() - .nest_service("/", ServeDir::new("public")) + .fallback_service(ServeDir::new("public")) .layer( ServiceBuilder::new() .layer(CorsLayer::permissive()) // Enable CORS policy diff --git a/examples/whiteboard/src/main.rs b/examples/whiteboard/src/main.rs index 2d96993c..1a20036b 100644 --- a/examples/whiteboard/src/main.rs +++ b/examples/whiteboard/src/main.rs @@ -28,7 +28,7 @@ async fn main() -> Result<(), Box> { }); let app = axum::Router::new() - .nest_service("/", ServeDir::new("dist")) + .fallback_service(ServeDir::new("dist")) .layer( ServiceBuilder::new() .layer(CorsLayer::permissive()) // Enable CORS policy