Added web ui

This commit is contained in:
Ultradesu
2025-07-18 17:52:58 +03:00
parent 484ddd9803
commit d5ce88dfff
9 changed files with 1418 additions and 11 deletions

View File

@@ -1,6 +1,7 @@
mod client;
mod db;
mod server;
mod web;
use clap::Parser;
use env_logger;
@@ -119,6 +120,19 @@ async fn main() -> std::io::Result<()> {
let args = Args::parse();
// Check if we have the minimum required arguments
if !args.server && args.host.is_none() {
// Neither server mode nor client mode properly configured
eprintln!("Error: You must specify either server mode (--server) or client mode (--host)");
eprintln!();
eprintln!("Examples:");
eprintln!(" Server mode: {} --server --db-user admin --db-password pass --flows work,home", env!("CARGO_PKG_NAME"));
eprintln!(" Client mode: {} --host https://khm.example.com/work", env!("CARGO_PKG_NAME"));
eprintln!();
eprintln!("Use --help for more information.");
std::process::exit(1);
}
if args.server {
info!("Running in server mode");
if let Err(e) = server::run_server(args).await {