MCPcopy Create free account
hub / github.com/bytebase/bytebase / stopServer

Function stopServer

frontend/tests/e2e/framework/mode-start-new-bytebase.ts:301–316  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

299}
300
301export function stopServer(): void {
302 if (serverProcess?.pid) {
303 try {
304 process.kill(-serverProcess.pid, "SIGTERM");
305 } catch {
306 /* already dead */
307 }
308 serverProcess = undefined;
309 }
310 if (tempDir && fs.existsSync(tempDir)) {
311 fs.rmSync(tempDir, { recursive: true, force: true });
312 }
313 if (fs.existsSync(PID_FILE)) {
314 fs.unlinkSync(PID_FILE);
315 }
316}

Callers 2

globalSetupFunction · 0.90
globalTeardownFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected