mirror of
https://github.com/zyllian/webdog.git
synced 2025-01-17 19:22:21 -08:00
fix building without serve feature
This commit is contained in:
parent
399a0c1b87
commit
0d9c48db40
1 changed files with 3 additions and 3 deletions
|
@ -91,8 +91,7 @@ enum ResourceCommands {
|
|||
},
|
||||
}
|
||||
|
||||
#[tokio::main]
|
||||
async fn main() -> eyre::Result<()> {
|
||||
fn main() -> eyre::Result<()> {
|
||||
#[cfg(feature = "color-eyre")]
|
||||
color_eyre::install()?;
|
||||
|
||||
|
@ -136,7 +135,8 @@ async fn main() -> eyre::Result<()> {
|
|||
#[cfg(feature = "serve")]
|
||||
Commands::Serve { ip, port } => {
|
||||
let site = site()?;
|
||||
site.serve(&format!("{}:{}", ip, port)).await
|
||||
let rt = tokio::runtime::Runtime::new()?;
|
||||
rt.block_on(async move { site.serve(&format!("{}:{}", ip, port)).await })
|
||||
}
|
||||
Commands::Now => {
|
||||
let time = OffsetDateTime::now_utc();
|
||||
|
|
Loading…
Add table
Reference in a new issue