Skip to content

Commit

Permalink
relying on cfg instead of arg
Browse files Browse the repository at this point in the history
  • Loading branch information
brehen committed Jan 31, 2024
1 parent f54b3b0 commit d0b28c6
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions nebula/nebula_server/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -76,10 +76,10 @@ async fn main() -> anyhow::Result<()> {

axum::Server::bind(&SocketAddr::new(
options.host,
if options.in_production {
ports.https
} else {
if cfg!(debug_assertions) {
ports.http
} else {
ports.https
},
))
.serve(router.into_make_service())
Expand All @@ -102,8 +102,4 @@ pub struct ServerArgs {
/// Asset location
#[arg(short = 'a', long, default_value = "./assets")]
pub assets_path: String,

/// In production?
#[arg(long, action)]
pub in_production: bool,
}

0 comments on commit d0b28c6

Please sign in to comment.