mod database; mod helpers; mod model; mod servek; mod svc; use database::db::DB; use serde::{Deserialize, Serialize}; use servek::servek::Server; use svc::profiles::Profiler; #[derive(Clone, Copy, Serialize, Deserialize)] pub enum ActivityKind { Create, Like, Note, } #[derive(Clone, Serialize, Deserialize)] pub struct ActivityLD { pub context_uri: String, pub kind: ActivityKind, pub actor_uri: String, pub to_uris: Vec, pub object: Option, } #[derive(Clone, Serialize, Deserialize)] pub struct ObjectLD { pub context_uri: String, pub id: Option, pub kind: Option, pub attributed_to: Option, pub published: Option, pub content: Option, } #[tokio::main] async fn main() -> Result<(), anyhow::Error> { let db = DB::new( "localhost".to_owned(), "flabk".to_owned(), "flabk".to_owned(), ) .await?; let profiler = Profiler::new(db.users()); Server::new(profiler).listen_and_serve(8008).await; Ok(()) }