diff --git a/lnvps_nostr/index.html b/lnvps_nostr/index.html new file mode 100644 index 0000000..6ddcf75 --- /dev/null +++ b/lnvps_nostr/index.html @@ -0,0 +1,47 @@ + + + + LNVPS + + + + + + + +
+
+ LNVPS + logo +
+
+

This domain is using LNVPS' free NIP-05 hosting, get your own at LNVPS.net

+ +
+ + \ No newline at end of file diff --git a/lnvps_nostr/src/routes.rs b/lnvps_nostr/src/routes.rs index 108d242..ae10c2c 100644 --- a/lnvps_nostr/src/routes.rs +++ b/lnvps_nostr/src/routes.rs @@ -6,9 +6,10 @@ use rocket::{Request, Route, State, routes}; use serde::Serialize; use std::collections::HashMap; use std::sync::Arc; +use rocket::http::ContentType; pub fn routes() -> Vec { - routes![nostr_address] + routes![get_index, nostr_address] } #[derive(Serialize)] @@ -32,6 +33,12 @@ impl<'r> FromRequest<'r> for HostInfo<'r> { } } +#[rocket::get("/", format = "html")] +fn get_index() -> (ContentType, &'static str) { + const HTML: &str = include_str!("../index.html"); + (ContentType::HTML, HTML) +} + #[rocket::get("/.well-known/nostr.json?")] async fn nostr_address( host: HostInfo<'_>,