Skip to content

Commit

Permalink
fix(cli): get ip addr & port number from config
Browse files Browse the repository at this point in the history
  • Loading branch information
wiseaidev committed Dec 16, 2024
1 parent 86082ce commit cb3ec10
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions packages/cli/src/build/bundle.rs
Original file line number Diff line number Diff line change
Expand Up @@ -688,7 +688,7 @@ impl AppBundle {
use futures_util::StreamExt;
use tokio::process::Command;

const PORT: u16 = 9999;
let address = dioxus_cli_config::fullstack_address_or_localhost();

tracing::info!("Running SSG");

Expand All @@ -697,8 +697,8 @@ impl AppBundle {
self.server_exe()
.context("Failed to find server executable")?,
)
.env(dioxus_cli_config::SERVER_PORT_ENV, PORT.to_string())
.env(dioxus_cli_config::SERVER_IP_ENV, "127.0.0.1")
.env(dioxus_cli_config::SERVER_PORT_ENV, address.port())
.env(dioxus_cli_config::SERVER_IP_ENV, address.ip().to_string())
.stdout(std::process::Stdio::piped())
.stderr(std::process::Stdio::piped())
.kill_on_drop(true)
Expand Down

0 comments on commit cb3ec10

Please sign in to comment.