MCPcopy Index your code
hub / github.com/Waishnav/devspace / start

Function start

scripts/dev-server.mjs:20–36  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

18}
19
20function start() {
21 stoppingForRestart = false;
22 child = spawn("npx", ["tsx", "src/cli.ts", "serve"], {
23 cwd: repoRoot,
24 env: process.env,
25 stdio: "inherit",
26 });
27
28 child.on("exit", (code, signal) => {
29 child = undefined;
30 if (shuttingDown) return;
31 if (stoppingForRestart) return;
32
33 log(`server exited (${signal ?? code ?? "unknown"}); restarting in ${crashDelayMs}ms`);
34 scheduleRestart(crashDelayMs);
35 });
36}
37
38function scheduleRestart(delayMs = restartDelayMs) {
39 clearTimeout(restartTimer);

Callers 2

restartFunction · 0.70
dev-server.mjsFile · 0.70

Calls 2

logFunction · 0.85
scheduleRestartFunction · 0.85

Tested by

no test coverage detected