🚧 Incopora recursos estáticos con "use_static!()"
This commit is contained in:
parent
32d068065e
commit
bcf403ab50
10 changed files with 35 additions and 21 deletions
|
|
@ -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));
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue