puppy/bin/server/src/main.rs

30 lines
869 B
Rust
Raw Normal View History

//! 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;
2024-04-16 20:57:07 +02:00
/// Starts up the whole shebang.
2024-04-16 20:57:07 +02:00
#[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();
2024-04-16 20:57:07 +02:00
}