other.rs 354 B

1234567891011121314
  1. use actix_web::{get, HttpResponse, Responder, web};
  2. use crate::HTML;
  3. pub fn config(cfg: &mut web::ServiceConfig) {
  4. cfg.service(landing_page);
  5. }
  6. #[get("/")]
  7. async fn landing_page() -> impl Responder {
  8. let html = HTML.get().expect("No HTML");
  9. HttpResponse::Ok()
  10. .content_type("text/html; charset=utf-8")
  11. .body(html.clone())
  12. }