MCPcopy Create free account
hub / github.com/damms005/devdb-vscode / getProjectRoot

Function getProjectRoot

src/services/mcp/http-server.ts:19–28  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

17let port: number | null = null;
18
19export function getProjectRoot(): string {
20 const workspaceFolders = vscode.workspace.workspaceFolders;
21 const workspacePath = workspaceFolders?.[0]?.uri.fsPath;
22
23 if (!workspacePath) {
24 throw new Error('No workspace found');
25 }
26
27 return workspacePath;
28}
29
30async function startServerOnAvailablePort(app: express.Express, startPort: number = 50001): Promise<{ server: ReturnType<typeof app.listen>, port: number }> {
31 let currentPort = startPort;

Callers 2

startHttpServerFunction · 0.85
stopHttpServerFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected