added fileserver and index.html

This commit is contained in:
Arlo Filley 2022-09-29 10:39:18 +01:00
parent fe92cc35f0
commit 6797e6a952
2 changed files with 13 additions and 1 deletions

View File

@ -9,6 +9,6 @@ fn index() -> String {
#[launch] #[launch]
fn rocket() -> Rocket<Build> { fn rocket() -> Rocket<Build> {
rocket::build() rocket::build()
.mount("/", routes![index]) // .mount("/", routes![index])
.mount("/", FileServer::from(relative!("website"))) .mount("/", FileServer::from(relative!("website")))
} }

12
website/index.html Normal file
View File

@ -0,0 +1,12 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
</head>
<body>
Hello Fileserver
</body>
</html>