feat: update

Signed-off-by: kjuulh <contact@kjuulh.io>
This commit is contained in:
2024-04-06 21:30:49 +02:00
parent 34fabb72be
commit 7e22a7f3ab
7 changed files with 300 additions and 446 deletions

View File

@@ -14,6 +14,7 @@ use axum::{
use churn_domain::AgentEnrollReq;
use clap::{Parser, Subcommand};
use serde_json::json;
use tokio::net::TcpListener;
#[derive(Parser)]
#[command(author, version, about, long_about = None, subcommand_required = true)]
@@ -70,8 +71,8 @@ async fn handle_command(cmd: Command) -> anyhow::Result<()> {
.with_state(AppState::default());
tracing::info!("churn server listening on {}", host);
axum::Server::bind(&host)
.serve(app.into_make_service())
let listener = TcpListener::bind(&host).await?;
axum::serve(listener, app.into_make_service())
.await
.unwrap();