2025-08-19 22:01:20 +05:30
|
|
|
use clap::Parser;
|
|
|
|
|
use gurty::{
|
|
|
|
|
cli::{Cli, Commands},
|
|
|
|
|
command_handler::{CommandHandler, CommandHandlerBuilder},
|
|
|
|
|
Result,
|
|
|
|
|
};
|
2025-08-14 20:29:19 +03:00
|
|
|
|
|
|
|
|
#[tokio::main]
|
|
|
|
|
async fn main() -> Result<()> {
|
|
|
|
|
let cli = Cli::parse();
|
|
|
|
|
|
|
|
|
|
match cli.command {
|
2025-08-19 22:01:20 +05:30
|
|
|
Commands::Serve(serve_cmd) => {
|
|
|
|
|
let handler = CommandHandlerBuilder::new()
|
|
|
|
|
.with_logging(serve_cmd.verbose)
|
|
|
|
|
.initialize_logging()
|
|
|
|
|
.build_serve_handler(serve_cmd);
|
2025-08-14 20:29:19 +03:00
|
|
|
|
2025-08-19 22:01:20 +05:30
|
|
|
handler.execute().await
|
2025-08-14 20:29:19 +03:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|