MCPcopy Create free account
hub / github.com/MigoXLab/coderio / stopDevServer

Method stopDevServer

src/tools/launch-tool/index.ts:90–109  ·  view source on GitHub ↗
(serverKey: string)

Source from the content-addressed store, hash-verified

88 }
89
90 async stopDevServer(serverKey: string): Promise<string> {
91 const entry = LaunchTool.serverManagers.get(serverKey);
92 if (!entry) {
93 const result: StopDevServerResult = { success: false, serverKey, error: `Unknown serverKey: ${serverKey}` };
94 return JSON.stringify(result, null, 2);
95 }
96 try {
97 await entry.manager.stop();
98 LaunchTool.serverManagers.delete(serverKey);
99 const result: StopDevServerResult = { success: true, serverKey };
100 return JSON.stringify(result, null, 2);
101 } catch (error) {
102 const result: StopDevServerResult = {
103 success: false,
104 serverKey,
105 error: error instanceof Error ? error.message : String(error),
106 };
107 return JSON.stringify(result, null, 2);
108 }
109 }
110}

Callers 1

validationLoopFunction · 0.95

Calls 1

stopMethod · 0.80

Tested by

no test coverage detected