🚧 Incopora recursos estáticos con "use_static!()"

This commit is contained in:
Manuel Cillero 2023-06-23 12:31:43 +02:00
parent 32d068065e
commit bcf403ab50
10 changed files with 35 additions and 21 deletions

View file

@ -5,7 +5,7 @@ use_handle!(MODULE_DEMOHOME);
use_locale!(LOCALE_DEMOHOME, "src/locale");
include!(concat!(env!("OUT_DIR"), "/homedemo.rs"));
use_static!(homedemo);
pub struct HomeDemo;
@ -27,7 +27,7 @@ impl ModuleTrait for HomeDemo {
}
fn configure_service(&self, cfg: &mut service::web::ServiceConfig) {
serve_static_files!(cfg, "/homedemo", bundle_homedemo);
serve_static_files!(cfg, "/homedemo", homedemo);
cfg.route("/", service::web::get().to(demo));
}
}