Skip to content

Commit fadce45

Browse files
committed
Merge branch 'develop' into j/spawn-join
2 parents 4f7c713 + 519ed27 commit fadce45

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/hyperapp.rs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -495,12 +495,17 @@ where
495495

496496
pub fn setup_server(
497497
ui_config: Option<&HttpBindingConfig>,
498+
ui_path: Option<String>,
498499
endpoints: &[Binding],
499500
) -> http::server::HttpServer {
500501
let mut server = http::server::HttpServer::new(5);
501502

502503
if let Some(ui) = ui_config {
503-
if let Err(e) = server.serve_ui("ui", vec!["/"], ui.clone()) {
504+
if let Err(e) = server.serve_ui(
505+
&ui_path.unwrap_or_else(|| "ui".to_string()),
506+
vec!["/"],
507+
ui.clone(),
508+
) {
504509
panic!("failed to serve UI: {e}. Make sure that a ui folder is in /pkg");
505510
}
506511
}

0 commit comments

Comments
 (0)