mirror of
https://github.com/tuono-labs/tuono
synced 2026-07-25 12:52:47 -07:00
refactor(crates/tuono): build - ssg - disable zombie_processes warning and use TUONO_PORT to generate server URL (#199)
This commit is contained in:
committed by
GitHub
parent
0839579733
commit
1b62d8ddc2
+1
-1
@@ -7,7 +7,7 @@ members = [
|
||||
]
|
||||
exclude = [
|
||||
"apps/documentation",
|
||||
"examples/wit-mdx",
|
||||
"examples/with-mdx",
|
||||
"examples/tuono-app",
|
||||
"examples/tuono-tutorial",
|
||||
"benches/tuono"
|
||||
|
||||
@@ -133,6 +133,8 @@ pub fn app() -> std::io::Result<()> {
|
||||
)
|
||||
.expect("Failed to clone assets into static output folder");
|
||||
|
||||
// the process is killed below so we don't really need to use wait() function
|
||||
#[allow(clippy::zombie_processes)]
|
||||
let mut rust_server = app.run_rust_server();
|
||||
|
||||
let reqwest = reqwest::blocking::Client::builder()
|
||||
@@ -144,7 +146,8 @@ pub fn app() -> std::io::Result<()> {
|
||||
let mut is_server_ready = false;
|
||||
|
||||
while !is_server_ready {
|
||||
if reqwest.get("http://localhost:3000").send().is_ok() {
|
||||
let server_url = format!("http://localhost:{}", TUONO_PORT);
|
||||
if reqwest.get(server_url).send().is_ok() {
|
||||
is_server_ready = true
|
||||
}
|
||||
// TODO: add maximum tries
|
||||
|
||||
Reference in New Issue
Block a user