diff options
Diffstat (limited to 'planetwars-cli/src/commands/serve.rs')
-rw-r--r-- | planetwars-cli/src/commands/serve.rs | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/planetwars-cli/src/commands/serve.rs b/planetwars-cli/src/commands/serve.rs new file mode 100644 index 0000000..2a2e59b --- /dev/null +++ b/planetwars-cli/src/commands/serve.rs @@ -0,0 +1,18 @@ +use std::env; +use std::io; + +use clap::Parser; + +use crate::web; + +#[derive(Parser)] +pub struct ServeCommand; + +impl ServeCommand { + pub async fn run(self) -> io::Result<()> { + let project_dir = env::current_dir().unwrap(); + + web::run(project_dir).await; + Ok(()) + } +} |