use crate::{application::APP, prelude::*, router::Router};
use abscissa_core::{Command, Options, Runnable};
use std::process;
#[derive(Command, Debug, Options)]
pub struct StartCmd {}
impl Runnable for StartCmd {
fn run(&self) {
let router = Router::init().unwrap_or_else(|e| {
status_err!("{}", e);
process::exit(1);
});
abscissa_tokio::run(&APP, async { router.route().await }).unwrap_or_else(|e| {
status_err!("executor exited with error: {}", e);
process::exit(1);
});
}
}