Riley Apeldoorn
564771931f
* Reorganize the fetch component * Organize the server code a little more * Move verification to the server and clean it up * Improve the error handling around the fetch code
29 lines
869 B
Rust
29 lines
869 B
Rust
//! The ActivityPuppy social media server.
|
|
//!
|
|
//! This crate contains the implementation of the ActivityPuppy's server binary. Also see the library,
|
|
//! [`puppy`], and the other two major components: [`store`] for persistence and [`fetch`] for the
|
|
//! federation implementation.
|
|
//!
|
|
//! [`store`]: puppy::store
|
|
//! [`fetch`]: puppy::fetch
|
|
#![feature(try_blocks, yeet_expr)]
|
|
|
|
use puppy::{config::Config, Context};
|
|
|
|
mod sig;
|
|
mod api;
|
|
|
|
/// Starts up the whole shebang.
|
|
#[tokio::main]
|
|
async fn main() {
|
|
// TODO: load the config from a file or something.
|
|
let config = Config {
|
|
ap_domain: "test.piss-on.me".to_string(),
|
|
wf_domain: "test.piss-on.me".to_string(),
|
|
state_dir: ".state".to_string(),
|
|
port: 1312,
|
|
};
|
|
let context = Context::load(config).unwrap();
|
|
// Start the web server
|
|
api::start(context).await.unwrap();
|
|
}
|