Skip to main content
Glama
vibase-ai
by vibase-ai
connection-manager.ts666 B
import { Pool } from "pg"; // Connection pool manager export class ConnectionManager { private pools: Map<string, Pool> = new Map(); getPool(sourceName: string, connectionString: string): Pool { if (!this.pools.has(sourceName)) { const pool = new Pool({ connectionString, max: 10, idleTimeoutMillis: 30000, connectionTimeoutMillis: 2000, }); this.pools.set(sourceName, pool); } return this.pools.get(sourceName)!; } async closeAll(): Promise<void> { const promises = Array.from(this.pools.values()).map((pool) => pool.end()); await Promise.all(promises); this.pools.clear(); } }

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/vibase-ai/vibase'

If you have feedback or need assistance with the MCP directory API, please join our Discord server