diff --git a/src/app/args/structure.rs b/src/app/args/structure.rs index 3ec5d63..d2c4442 100644 --- a/src/app/args/structure.rs +++ b/src/app/args/structure.rs @@ -13,5 +13,7 @@ pub enum CommandArg { /// Checks if everything required for docki is installed Health, /// Helper command for installing asciidoctor-reveal-js - InstallReveal + InstallReveal, + /// Starts a Webserver with the live preview of the Documentation + Serve } diff --git a/src/app/commands/mod.rs b/src/app/commands/mod.rs index cbf575e..fe8dae8 100644 --- a/src/app/commands/mod.rs +++ b/src/app/commands/mod.rs @@ -1,6 +1,5 @@ -pub mod traits; pub mod executions; pub mod build; pub mod health; pub mod install_reveal; -mod serve; +pub mod serve; diff --git a/src/app/commands/serve.rs b/src/app/commands/serve.rs index ca0fb3b..a501417 100644 --- a/src/app/commands/serve.rs +++ b/src/app/commands/serve.rs @@ -1,14 +1,3 @@ -use super::traits::Command; - -pub struct Serve; - -impl Command for Serve { - fn execute(&self, _args: &std::collections::HashMap) -> Result<(), String> { - println!("serving the application"); - return Ok(()) - } - - fn new() -> Self where Self: Sized { - return Self {} - } +pub fn serve() { + println!("serving the developement version") } diff --git a/src/app/mod.rs b/src/app/mod.rs index 2b5e304..d0bdcc8 100644 --- a/src/app/mod.rs +++ b/src/app/mod.rs @@ -9,6 +9,7 @@ use self::args::{args, structure::CommandArg}; use self::commands::build::build; use self::commands::health::health; use self::commands::install_reveal::install_reveal; +use self::commands::serve::serve; pub struct App; @@ -21,7 +22,8 @@ impl App { match args.command { CommandArg::Build => build(), CommandArg::Health => health(), - CommandArg::InstallReveal => install_reveal() + CommandArg::InstallReveal => install_reveal(), + CommandArg::Serve => serve() } }