diff --git a/src/main.rs b/src/main.rs index 3ed43da..5f3170c 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1,10 +1,13 @@ #[macro_use] extern crate rocket; use core::time; -use std::time::{SystemTime, UNIX_EPOCH}; +use std::{ + path::Path, + time::{SystemTime, UNIX_EPOCH}, +}; use maud::{html, Markup, DOCTYPE}; -use rocket::fs::{relative, FileServer}; +use rocket::fs::FileServer; #[get("/")] fn index() -> Markup { @@ -135,9 +138,11 @@ fn skeleton(children: Markup) -> Markup { #[launch] fn rocket() -> _ { - std::thread::sleep(time::Duration::from_secs(360)); + std::thread::sleep(time::Duration::from_secs(30)); + + let static_files_path = Path::new("./public"); rocket::build() .mount("/", routes![index]) - .mount("/public", FileServer::from(relative!("public"))) + .mount("/public", FileServer::from(static_files_path)) }