use actix_web::{get, HttpRequest, Responder}; use maud::html; // This is a basic setup for using web-base // basic actix-web route #[get("/")] pub(crate) async fn index(r: HttpRequest) -> impl Responder { let content = html!( p { "Hello World" }; ) .into_string(); // build a response based on the site configuration web_base::func::build_site(&r, "Index", &content) } #[actix_web::main] async fn main() -> std::io::Result<()> { // basic site configuration let site = web_base::Site::new() .enable_bootstrap(false) .enable_picocss(false); // start server web_base::map!(site, |app: actix_web::App<_>| { // add your routes app.service(index) }) .bind(("0.0.0.0".to_string(), 8080))? .run() .await }