remove separate ui service, serve ui with backend
All checks were successful
Gitea Actions Demo / Explore-Gitea-Actions (push) Successful in 10s

This commit is contained in:
2025-07-18 01:54:26 +01:00
parent f9047644fe
commit a54648d11b
69 changed files with 145 additions and 11214 deletions

30
src/main.rs Normal file
View File

@ -0,0 +1,30 @@
use std::net::SocketAddr;
use clap::{Parser, command};
use nuchat::run;
use tracing::{Level, event};
#[derive(Parser, Debug)]
#[command(version, about, long_about = None)]
struct Args {
/// Host to bind to
#[arg(long, default_value = "127.0.0.1")]
host: String,
/// Port to use
#[arg(long, default_value_t = 7000)]
port: u16,
}
#[tokio::main]
async fn main() -> Result<(), std::io::Error> {
let args = Args::parse();
let str_address = format!("{}:{}", args.host, args.port);
let address: SocketAddr = str_address
.parse()
.unwrap_or_else(|_| panic!("could not parse address: {str_address}"));
let listener = tokio::net::TcpListener::bind(address).await?;
let result = run(listener)?.await;
event!(Level::INFO, "Server stopped");
result
}