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