diff --git a/server/src/api/mod.rs b/server/src/api/mod.rs index 50cfc8a..196d988 100644 --- a/server/src/api/mod.rs +++ b/server/src/api/mod.rs @@ -6,47 +6,15 @@ pub mod search; pub mod stats; pub mod ws; -use axum::{routing::{get, post}, Json, Router}; use axum::response::Html; +use axum::{routing::{get, post}, Router}; use tower_http::cors::CorsLayer; use crate::state::SharedState; +const INDEX_HTML: &str = include_str!("../../static/index.html"); + async fn index() -> Html<&'static str> { - Html(r#" - - - - -Ares Next - - - -
-

Ares Next

- online -

Tracker P2P + busca de arquivos por hash — API pública

- -
- -"#) + Html(INDEX_HTML) } pub fn router(state: SharedState) -> Router { diff --git a/server/static/index.html b/server/static/index.html new file mode 100644 index 0000000..f036da4 --- /dev/null +++ b/server/static/index.html @@ -0,0 +1,306 @@ + + + + + +Ares Next — Tracker P2P + + + +
+
+ +
+
Arquivos –
+
Peers online –
+
Total –
+
v–
+
+
+
+
+ +
+ + + +
+
+
+
Ainda não há arquivosBusque acima ou anuncie um arquivo para começar.
+
+
+ Anunciar arquivo (POST /api/v1/announce) +
+ + + + + + + + +
+
+
+
+
+ + +

+
+
+ +
+
+ + + +