From fe92cc35f0c40df0200bfb8740aa68e22c0cdc61 Mon Sep 17 00:00:00 2001 From: ArloFilley Date: Thu, 29 Sep 2022 10:33:45 +0100 Subject: [PATCH] changed path to a relative one --- src/main.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main.rs b/src/main.rs index ce071ff..8d65cb3 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1,5 +1,5 @@ #[macro_use] extern crate rocket; -use rocket::{Rocket, Build, fs::FileServer}; +use rocket::{Rocket, Build, fs::{FileServer, relative}}; #[get("/")] fn index() -> String { @@ -10,5 +10,5 @@ fn index() -> String { fn rocket() -> Rocket { rocket::build() .mount("/", routes![index]) - .mount("/", FileServer::from("/Users/arlo/Desktop/p5stuff/cs_coursework/website")) + .mount("/", FileServer::from(relative!("website"))) } \ No newline at end of file