Load index
This commit is contained in:
parent
de275a27cb
commit
01fd419759
@ -93,8 +93,12 @@ fn check_method(event: &nostr::Event, method: &str) -> bool {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#[rocket::get("/")]
|
#[rocket::get("/")]
|
||||||
async fn root() -> &'static str {
|
async fn root() -> Result<NamedFile, Status> {
|
||||||
"Hello welcome to void_cat_rs"
|
if let Ok(f) = NamedFile::open("./ui/index.html").await {
|
||||||
|
Ok(f)
|
||||||
|
} else {
|
||||||
|
Err(Status::InternalServerError)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[rocket::get("/<sha256>")]
|
#[rocket::get("/<sha256>")]
|
||||||
|
@ -2,9 +2,17 @@
|
|||||||
<html lang="en">
|
<html lang="en">
|
||||||
<head>
|
<head>
|
||||||
<meta charset="UTF-8">
|
<meta charset="UTF-8">
|
||||||
<title>Test Page</title>
|
<title>void_cat_rs</title>
|
||||||
|
<style>
|
||||||
|
html {
|
||||||
|
background-color: black;
|
||||||
|
color: white;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
|
<h1>
|
||||||
|
Welcome to void_cat_rs
|
||||||
|
</h1>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
Loading…
x
Reference in New Issue
Block a user