Add homepage
This commit is contained in:
parent
c3e2ff13f2
commit
86e158c7c5
3 changed files with 18 additions and 0 deletions
|
|
@ -6,6 +6,7 @@ mod fetch_document_version;
|
|||
mod fetch_document_version_content;
|
||||
mod fetch_latest_document_version;
|
||||
mod fetch_latest_documents;
|
||||
mod index;
|
||||
mod ping;
|
||||
mod requests;
|
||||
mod responses;
|
||||
|
|
@ -54,6 +55,7 @@ pub async fn create_server(config_path: Option<OsString>) -> Result<()> {
|
|||
|
||||
let app = Router::new()
|
||||
.nest("/", get_authed_routes(app_state.clone()))
|
||||
.route("/", get(index::index))
|
||||
.route("/vaults/:vault_id/ping", get(ping::ping))
|
||||
.route("/vaults/:vault_id/ws", get(websocket::websocket_handler))
|
||||
.layer(DefaultBodyLimit::disable())
|
||||
|
|
|
|||
9
backend/sync_server/src/server/assets/index.html
Normal file
9
backend/sync_server/src/server/assets/index.html
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>VaultLink</title>
|
||||
</head>
|
||||
<body>
|
||||
<h1>VaultLink server</h1>
|
||||
</body>
|
||||
</html>
|
||||
7
backend/sync_server/src/server/index.rs
Normal file
7
backend/sync_server/src/server/index.rs
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
use axum::response::{Html, IntoResponse};
|
||||
|
||||
pub async fn index() -> impl IntoResponse {
|
||||
const HTML_CONTENT: &str = include_str!("./assets/index.html");
|
||||
let html_content = HTML_CONTENT;
|
||||
Html(html_content)
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue