We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d67b65e commit 232fe25Copy full SHA for 232fe25
src/hyperapp.rs
@@ -396,12 +396,17 @@ where
396
397
pub fn setup_server(
398
ui_config: Option<&HttpBindingConfig>,
399
+ ui_path: Option<String>,
400
endpoints: &[Binding],
401
) -> http::server::HttpServer {
402
let mut server = http::server::HttpServer::new(5);
403
404
if let Some(ui) = ui_config {
- if let Err(e) = server.serve_ui("ui", vec!["/"], ui.clone()) {
405
+ if let Err(e) = server.serve_ui(
406
+ &ui_path.unwrap_or_else(|| "ui".to_string()),
407
+ vec!["/"],
408
+ ui.clone(),
409
+ ) {
410
panic!("failed to serve UI: {e}. Make sure that a ui folder is in /pkg");
411
}
412
0 commit comments