added file server
This commit is contained in:
parent
dd91be366b
commit
87619639fb
@ -1,5 +1,5 @@
|
|||||||
#[macro_use] extern crate rocket;
|
#[macro_use] extern crate rocket;
|
||||||
use rocket::{Rocket, Build};
|
use rocket::{Rocket, Build, fs::FileServer};
|
||||||
|
|
||||||
#[get("/")]
|
#[get("/")]
|
||||||
fn index() -> String {
|
fn index() -> String {
|
||||||
@ -10,4 +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"))
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user