use std::path::{Path, PathBuf}; use rocket::response::NamedFile; #[get("/")] pub fn index() -> Option { NamedFile::open("static/index.html").ok() } #[get("/", rank = 2)] pub fn files(file: PathBuf) -> Option { NamedFile::open(Path::new("static/").join(file)).ok() }