diff options
author | Ilion Beyst <ilion.beyst@gmail.com> | 2021-12-26 21:54:26 +0100 |
---|---|---|
committer | Ilion Beyst <ilion.beyst@gmail.com> | 2021-12-26 21:54:26 +0100 |
commit | 0d03a0fbc214dd3fb9a8af562f9d88cccaf5f2c0 (patch) | |
tree | aa93706592a050fc01a220546b73889faeab80fe /planetwars-cli/src/commands/serve.rs | |
parent | c04d4a449bd147c632c0b6ceae04f0514803b66f (diff) | |
download | planetwars.dev-0d03a0fbc214dd3fb9a8af562f9d88cccaf5f2c0.tar.xz planetwars.dev-0d03a0fbc214dd3fb9a8af562f9d88cccaf5f2c0.zip |
refactor commands
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(()) + } +} |