Coverage Report

Created: 2024-02-20 21:15

/builds/xfbs/cindy/src/command/serve.rs
Line
Count
Source (jump to first uncovered line)
1
use crate::{cli::ServeCommand, Cindy};
2
use anyhow::Result;
3
use axum::Server;
4
5
impl Cindy {
6
0
    pub async fn command_serve(&self, command: &ServeCommand) -> Result<()> {
7
0
        let server = Server::try_bind(&command.listen)?;
8
0
        println!("Listening on {}", command.listen);
9
0
        server.serve(self.router().into_make_service()).await?;
10
0
        Ok(())
11
0
    }
12
}