mirror of
https://github.com/zyllian/webdog.git
synced 2025-05-10 10:36:39 -07: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]
|
fn main() -> eyre::Result<()> {
|
||||||
async fn main() -> eyre::Result<()> {
|
|
||||||
#[cfg(feature = "color-eyre")]
|
#[cfg(feature = "color-eyre")]
|
||||||
color_eyre::install()?;
|
color_eyre::install()?;
|
||||||
|
|
||||||
|
@ -136,7 +135,8 @@ async fn main() -> eyre::Result<()> {
|
||||||
#[cfg(feature = "serve")]
|
#[cfg(feature = "serve")]
|
||||||
Commands::Serve { ip, port } => {
|
Commands::Serve { ip, port } => {
|
||||||
let site = site()?;
|
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 => {
|
Commands::Now => {
|
||||||
let time = OffsetDateTime::now_utc();
|
let time = OffsetDateTime::now_utc();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue