()
| 102 | if (!existing.auth_token) throw err; |
| 103 | // Fall through and start a fresh backend. |
| 104 | } |
| 105 | } |
| 106 | fs.mkdirSync(path.dirname(endpointPath()), { recursive: true, mode: 0o700 }); |
| 107 | fs.mkdirSync(path.dirname(backendLogPath()), { recursive: true, mode: 0o700 }); |
| 108 | const logPath = backendLogPath(); |
| 109 | const logFd = fs.openSync(logPath, "a", 0o600); |
| 110 | fs.writeSync(logFd, `\n--- lumina-backend start ${new Date().toISOString()} ---\n`); |
| 111 | const before = Date.now(); |
| 112 | const child = spawn(backendBin(), ["daemon", "--host", "127.0.0.1", "--port", "0"], { |
| 113 | detached: true, |
no test coverage detected