use rocket; use std::fs::File; use std::io::Error as IOError; #[get(path = "/")] pub fn index() -> File { File::open("static/index.html").unwrap() } #[get("/")] pub fn files(file: &str) -> Result { File::open(format!("static/{}", file)) }