aboutsummaryrefslogtreecommitdiff
path: root/planetwars-cli/src/commands/serve.rs
blob: aa8d1496fdb64e227cbee2ee073801bc03549f24 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
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(())
    }
}