We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 4f7c713 + 519ed27 commit fadce45Copy full SHA for fadce45
1 file changed
src/hyperapp.rs
@@ -495,12 +495,17 @@ where
495
496
pub fn setup_server(
497
ui_config: Option<&HttpBindingConfig>,
498
+ ui_path: Option<String>,
499
endpoints: &[Binding],
500
) -> http::server::HttpServer {
501
let mut server = http::server::HttpServer::new(5);
502
503
if let Some(ui) = ui_config {
- 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
+ ) {
509
panic!("failed to serve UI: {e}. Make sure that a ui folder is in /pkg");
510
}
511
0 commit comments