use actix_web::{get, HttpRequest, Responder}; use maud::html; #[get("/")] pub(crate) async fn index(r: HttpRequest) -> impl Responder { let content = html!( p { "Hello World" }; ) .into_string(); web_base::func::build_site(&r, "Index", &content) } #[actix_web::main] async fn main() -> std::io::Result<()> { let site = web_base::Site::new() .enable_bootstrap(false) .enable_picocss(false) .add_manifest( web_base::Manifest::new("Web_Base") .set_short_name("Web Base") .add_category("web") .add_category("actix") .set_background_color("red") .set_description("Web Base App") .set_display(web_base::ManifestDisplay::MinimalUI) .set_start_url("/"), ); web_base::map!(site, |app: actix_web::App<_>| { app.service(index) }) .bind(("0.0.0.0".to_string(), 8080))? .run() .await }