diff options
Diffstat (limited to 'planetwars-cli/src/commands/serve.rs')
| -rw-r--r-- | planetwars-cli/src/commands/serve.rs | 17 |
1 files changed, 17 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..aa8d149 --- /dev/null +++ b/planetwars-cli/src/commands/serve.rs @@ -0,0 +1,17 @@ +use std::io; + +use clap::Parser; + +use crate::web; +use crate::workspace::Workspace; + +#[derive(Parser)] +pub struct ServeCommand; + +impl ServeCommand { + pub async fn run(self) -> io::Result<()> { + let workspace = Workspace::open_current_dir()?; + web::run(workspace).await; + Ok(()) + } +} |
