Server config

This commit is contained in:
2026-08-11 22:27:37 -04:00
parent c910769eb3
commit d5d79a73a2
5 changed files with 48 additions and 1 deletions
+3 -1
View File
@@ -6,16 +6,18 @@ use axum::{
};
use ed25519_dalek::SigningKey;
use crate::protocol::Client;
use crate::{config::Config, protocol::Client};
pub struct Server {
pub key: SigningKey,
pub config: Config,
}
impl Server {
pub async fn new() -> anyhow::Result<Arc<Self>> {
Ok(Arc::new(Self {
key: crate::signature::get().await?,
config: Config::get().await?,
}))
}
}