Changed from user specific, to open for everyone

This commit is contained in:
Ace
2026-06-26 11:48:51 +02:00
parent 4c09635d30
commit da702d6beb
8 changed files with 269 additions and 4 deletions
+23
View File
@@ -0,0 +1,23 @@
import { execSync } from "node:child_process"
import { platform } from "node:os"
const url = process.argv[2] || "http://localhost:3001/splash"
const sleep = (ms) => new Promise((r) => setTimeout(r, ms))
async function main() {
await sleep(8000)
try {
if (platform() === "win32") {
execSync(`start "" "${url}"`, { stdio: "ignore", timeout: 5000 })
} else if (platform() === "darwin") {
execSync(`open "${url}"`, { stdio: "ignore", timeout: 5000 })
} else {
execSync(`xdg-open "${url}"`, { stdio: "ignore", timeout: 5000 })
}
} catch (e) {
console.error("Failed to open browser:", e.message)
}
}
main()