Serve the static files from the stoptime_ui crate
Do this on the root path (/), not on /static.
This commit is contained in:
parent
05a96934f3
commit
6a70bbb13e
|
@ -11,11 +11,11 @@ pub mod catchers;
|
||||||
pub mod handlers;
|
pub mod handlers;
|
||||||
|
|
||||||
fn rocket() -> Rocket {
|
fn rocket() -> Rocket {
|
||||||
let static_dir = concat!(env!("CARGO_MANIFEST_DIR"), "/static");
|
let static_dir = concat!(env!("CARGO_MANIFEST_DIR"), "/../ui/static");
|
||||||
let static_files = StaticFiles::from(static_dir);
|
let static_files = StaticFiles::from(static_dir);
|
||||||
|
|
||||||
rocket::ignite()
|
rocket::ignite()
|
||||||
.mount("/", routes![handlers::index])
|
.mount("/", static_files)
|
||||||
.mount(
|
.mount(
|
||||||
"/company",
|
"/company",
|
||||||
routes![handlers::company::index, handlers::company::create],
|
routes![handlers::company::index, handlers::company::create],
|
||||||
|
@ -41,7 +41,6 @@ fn rocket() -> Rocket {
|
||||||
],
|
],
|
||||||
)
|
)
|
||||||
.mount("/invoices", routes![handlers::invoices::index])
|
.mount("/invoices", routes![handlers::invoices::index])
|
||||||
.mount("/static", static_files)
|
|
||||||
.mount(
|
.mount(
|
||||||
"/timeline",
|
"/timeline",
|
||||||
routes![
|
routes![
|
||||||
|
|
Loading…
Reference in New Issue