Skip to main content
Glama
apolosan

Design Patterns MCP Server

by apolosan
test-db.ts653 B
import { join } from 'path'; import { existsSync } from 'fs'; export function getTestDatabasePath(): string { if (process.env.TEST_DB_PATH && existsSync(process.env.TEST_DB_PATH)) { return process.env.TEST_DB_PATH; } const mainDbPath = join(__dirname, '..', '..', 'data', 'design-patterns.db'); if (existsSync(mainDbPath)) { return mainDbPath; } throw new Error('Test database not found. Run setup first or ensure main database exists.'); } export function getTestDatabaseConfig(readonly: boolean = true) { return { filename: getTestDatabasePath(), options: { readonly, fileMustExist: true } }; }

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/apolosan/design_patterns_mcp'

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