MCPcopy Create free account
hub / github.com/NativeScript/SimDeck / startServer

Function startServer

scripts/integration/cli.mjs:715–745  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

713}
714
715function startServer() {
716 killPortListeners(serverPort);
717 logStep(`starting server on ${serverUrl}`);
718 serverProcess = spawn(
719 simdeck,
720 [
721 "service",
722 "run",
723 "--metadata-path",
724 path.join(tempRoot, "service.json"),
725 "--port",
726 String(serverPort),
727 "--client-root",
728 path.join(root, "packages", "client", "dist"),
729 "--access-token",
730 "integration",
731 "--video-codec",
732 "software",
733 ],
734 {
735 cwd: root,
736 stdio: ["ignore", "pipe", "pipe"],
737 },
738 );
739 serverProcess.stdout.on("data", (data) =>
740 process.stdout.write(`[service] ${data}`),
741 );
742 serverProcess.stderr.on("data", (data) =>
743 process.stderr.write(`[service] ${data}`),
744 );
745}
746
747async function waitForHealth(options = {}) {
748 const deadline = Date.now() + (options.timeoutMs ?? 30_000);

Callers 1

mainFunction · 0.70

Calls 2

logStepFunction · 0.85
killPortListenersFunction · 0.70

Tested by

no test coverage detected