Call the local process the local engine, not a server
Windows users read "server" as a network service and asked whether the app phones home, even though the bundle only ever talks to 127.0.0.1. The launcher dialogs, the help text, the Stop shortcut and the bundle README now call it the local engine and say plainly that it is a background process on this PC.
This commit is contained in:
@@ -3,15 +3,15 @@
|
||||
|
||||
This is the no-toolchain launcher: it ships in every bundle and is what
|
||||
Luminary.exe replaces when a Go build is available. It owns the three things
|
||||
the server deliberately does not do for itself:
|
||||
Luminary's local engine deliberately does not do for itself:
|
||||
|
||||
1. Pick a free loopback port and pass it as PORT.
|
||||
2. Start node.exe hidden with LUMINARY_DATA outside the bundle.
|
||||
3. Wait for /api/health before opening the browser.
|
||||
|
||||
Usage:
|
||||
Luminary.ps1 start (or reuse) the server and open the browser
|
||||
Luminary.ps1 -Stop stop the server started from this folder
|
||||
Luminary.ps1 start (or reuse) the local engine and open the browser
|
||||
Luminary.ps1 -Stop stop the local engine started from this folder
|
||||
Luminary.ps1 -Status report what is running and where the data lives
|
||||
Luminary.ps1 -Verify list the files the bundle must contain
|
||||
Luminary.ps1 -Repair re-download node.exe and check it against version.txt
|
||||
@@ -101,7 +101,7 @@ function Read-Runtime {
|
||||
# Invoke-WebRequest goes through WinINET, which resolves the system proxy (a PAC
|
||||
# script or WPAD) before it looks at the URL. On a machine with no network that
|
||||
# lookup can block for far longer than -TimeoutSec, so every probe timed out and
|
||||
# the launcher killed a healthy local server: the app "would not start" offline.
|
||||
# the launcher killed a healthy local engine: the app "would not start" offline.
|
||||
# A raw request over TCP to 127.0.0.1 uses no proxy, DNS or certificate store, so
|
||||
# start-up behaves the same with or without a connection.
|
||||
function Test-Health([int]$port) {
|
||||
@@ -561,7 +561,7 @@ if ($running) {
|
||||
}
|
||||
if (Test-Process ([int]$runtime.pid)) {
|
||||
$logNote = Join-Path (Get-DataDir) 'logs'
|
||||
Show-ErrorDialog ("Luminary has been starting for over two minutes and is not answering on port {0}.`n`nSee {1} for the server log." -f $runtime.port, $logNote)
|
||||
Show-ErrorDialog ("Luminary has been starting for over two minutes and is not answering on its local port {0}.`n`nSee {1} for the log." -f $runtime.port, $logNote)
|
||||
exit 1
|
||||
}
|
||||
}
|
||||
@@ -625,7 +625,7 @@ $logsOut = Get-LogDir $dataDir
|
||||
$port = Find-Port
|
||||
$url = "http://127.0.0.1:$port"
|
||||
|
||||
# The server reads these from the environment; nothing is written into app\.
|
||||
# The local engine reads these from the environment; nothing is written into app\.
|
||||
$env:PORT = "$port"
|
||||
$env:HOST = '127.0.0.1'
|
||||
$env:NODE_ENV = 'production'
|
||||
@@ -667,7 +667,7 @@ while ((Get-Date) -lt $deadline) {
|
||||
|
||||
$tail = ''
|
||||
if (Test-Path -LiteralPath $errLog) { $tail = (Get-Content -LiteralPath $errLog -Tail 20) -join "`n" }
|
||||
Write-Host 'Luminary did not answer on /api/health.'
|
||||
Write-Host "Luminary's local engine did not answer."
|
||||
if ($tail) { Write-Host $tail }
|
||||
if (-not $process.HasExited) { & taskkill.exe /PID $process.Id /T /F | Out-Null }
|
||||
Remove-Item -LiteralPath $runtimeFile -Force -ErrorAction SilentlyContinue
|
||||
|
||||
Reference in New Issue
Block a user