aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDuckonaut <duckonaut@#gmail.com>2026-11-09 17:18:10 +0100
committerDuckonaut <duckonaut@#gmail.com>2026-11-09 17:18:22 +0100
commit26ca3beb2fcbe7765fc6e2570dbbe376f62fae77 (patch)
tree95148e388da72d4d6338ec753a3ef699de10a9bb
parent0da8904eaaaa4d44fadbbbe2400077df3100afc6 (diff)
feature: add PID file
-rw-r--r--src/main.rs7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/main.rs b/src/main.rs
index 96d08c3..181ee5a 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -269,6 +269,13 @@ async fn serve(dev_mode: bool, address: &str, public_dir: Option<PathBuf>) -> Re
println!("🌴 App name: {}", name.bright_yellow());
}
+ if let Ok(xdg_run_dir) = std::env::var("XDG_RUNTIME_DIR") {
+ let pid_path: PathBuf = PathBuf::from(xdg_run_dir);
+ let pid_path = pid_path.join("reluax.pid");
+
+ println!("🪪 PID File: {}", pid_path.display());
+ }
+
println!("🛫 Starting server on address {}...", address);
server::Server::serve(lua, address, public_dir).await
}