MCPcopy Create free account
hub / github.com/cortexkit/magic-context / writePortFile

Function writePortFile

packages/plugin/src/shared/rpc-client.test.ts:37–45  ·  view source on GitHub ↗
(storageDir: string, directory: string, port: number)

Source from the content-addressed store, hash-verified

35}
36
37function writePortFile(storageDir: string, directory: string, port: number): void {
38 const portFile = rpcPortFilePath(storageDir, directory);
39 mkdirSync(dirname(portFile), { recursive: true });
40 writeFileSync(
41 portFile,
42 JSON.stringify({ port, pid: process.pid, started_at: Date.now() }),
43 "utf-8",
44 );
45}
46
47function writePortFileForPid(
48 storageDir: string,

Callers 1

rpc-client.test.tsFile · 0.85

Calls 1

rpcPortFilePathFunction · 0.90

Tested by

no test coverage detected