hello/
hello.rs

1use web_ui::{WebUI, WebUIConfig};
2
3#[tokio::main]
4async fn main() -> Result<(), Box<dyn std::error::Error>> {
5    let config = WebUIConfig::default()
6        .with_static_dir("./static/hello".to_string());
7    let web_ui = WebUI::new(config);
8    
9    // Simple button click handler
10    web_ui.bind_click("hello-btn", || {
11        println!("Hello, World!");
12    }).await;
13    
14    println!("Starting simple web UI on http://localhost:3030");
15    web_ui.run().await
16}