mod cli; mod db; mod error; mod repo; mod api; use clap::Parser; pub use error::{Result, ServerError}; use repo::RepoGroupManager; use std::path::PathBuf; use std::sync::{Arc, RwLock}; use sea_orm::DatabaseConnection; #[derive(Clone)] pub struct Config { repo_dir: PathBuf, pkg_dir: PathBuf, } #[derive(Clone)] pub struct Global { config: Config, repo_manager: Arc>, db: DatabaseConnection } #[tokio::main] async fn main() { let cli = cli::Cli::parse(); cli.run().await; }