changed path to a relative one

This commit is contained in:
Arlo Filley 2022-09-29 10:33:45 +01:00
parent 87619639fb
commit fe92cc35f0

View File

@ -1,5 +1,5 @@
#[macro_use] extern crate rocket; #[macro_use] extern crate rocket;
use rocket::{Rocket, Build, fs::FileServer}; use rocket::{Rocket, Build, fs::{FileServer, relative}};
#[get("/")] #[get("/")]
fn index() -> String { fn index() -> String {
@ -10,5 +10,5 @@ fn index() -> String {
fn rocket() -> Rocket<Build> { fn rocket() -> Rocket<Build> {
rocket::build() rocket::build()
.mount("/", routes![index]) .mount("/", routes![index])
.mount("/", FileServer::from("/Users/arlo/Desktop/p5stuff/cs_coursework/website")) .mount("/", FileServer::from(relative!("website")))
} }