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("/")]
|
||||
async fn root() -> &'static str {
|
||||
"Hello welcome to void_cat_rs"
|
||||
async fn root() -> Result<NamedFile, Status> {
|
||||
if let Ok(f) = NamedFile::open("./ui/index.html").await {
|
||||
Ok(f)
|
||||
} else {
|
||||
Err(Status::InternalServerError)
|
||||
}
|
||||
}
|
||||
|
||||
#[rocket::get("/<sha256>")]
|
||||
|
@ -2,9 +2,17 @@
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Test Page</title>
|
||||
<title>void_cat_rs</title>
|
||||
<style>
|
||||
html {
|
||||
background-color: black;
|
||||
color: white;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<h1>
|
||||
Welcome to void_cat_rs
|
||||
</h1>
|
||||
</body>
|
||||
</html>
|
Loading…
x
Reference in New Issue
Block a user