diff --git a/Cargo.toml b/Cargo.toml index 96cfab2..1e23fe2 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,3 +1,3 @@ [workspace] resolver = "2" -members = ["acrate_database", "acrate-hostmeta", "acrate-inbox", "acrate-nodeinfo", "acrate-webfinger"] +members = ["acrate_database", "acrate-hostmeta", "acrate-nodeinfo", "acrate-webfinger"] diff --git a/acrate-inbox/Cargo.toml b/acrate-inbox/Cargo.toml deleted file mode 100644 index cfec949..0000000 --- a/acrate-inbox/Cargo.toml +++ /dev/null @@ -1,12 +0,0 @@ -[package] -name = "acrate-inbox" -version = "0.1.0" -edition = "2021" - -[dependencies] -anyhow = "1.0.93" -axum = "0.7.7" -log = "0.4.22" -micronfig = "0.3.0" -pretty_env_logger = "0.5.0" -tokio = { version = "1.41.1", features = ["macros", "net", "rt-multi-thread"] } diff --git a/acrate-inbox/src/config.rs b/acrate-inbox/src/config.rs deleted file mode 100644 index 63babb0..0000000 --- a/acrate-inbox/src/config.rs +++ /dev/null @@ -1,3 +0,0 @@ -micronfig::config!( - ACRATE_INBOX_BIND_ADDRESS: String, -); diff --git a/acrate-inbox/src/main.rs b/acrate-inbox/src/main.rs deleted file mode 100644 index 8958b4c..0000000 --- a/acrate-inbox/src/main.rs +++ /dev/null @@ -1,31 +0,0 @@ -use anyhow::Context; - -mod config; -mod route; - - -#[tokio::main] -async fn main() -> anyhow::Result { - pretty_env_logger::init(); - log::debug!("Logging initialized!"); - - log::trace!("Creating Axum router..."); - let app = axum::Router::new() - .route("/inbox", axum::routing::post(route::inbox_handler)); - log::trace!("Axum router created successfully!"); - - log::trace!("Creating Tokio listener..."); - let bind_address = config::ACRATE_INBOX_BIND_ADDRESS(); - let listener = tokio::net::TcpListener::bind(bind_address) - .await - .context("failed to bind listener to address")?; - log::trace!("Tokio listener bound to: {bind_address}"); - - log::debug!("Starting server..."); - axum::serve(listener, app) - .await - .context("server exited with error")?; - - log::error!("Server exited with no error, panicking."); - panic!("server exited with no error"); -} diff --git a/acrate-inbox/src/route.rs b/acrate-inbox/src/route.rs deleted file mode 100644 index ca9ec6b..0000000 --- a/acrate-inbox/src/route.rs +++ /dev/null @@ -1,8 +0,0 @@ -#[allow(unreachable_code)] -pub async fn inbox_handler() { - todo!("pre-validation hook"); - todo!("validate signature"); - todo!("post-validation hook"); - todo!("database storage"); - todo!("post-storage hook"); -}