Skip to main content
Glama
index.ts825 B
import { readdirSync } from 'fs'; import { dirname } from 'path'; import { fileURLToPath } from 'url'; const __filename = fileURLToPath(import.meta.url); const __dirname = dirname(__filename); // Automatically import all .js files in this directory (except index.js) // At runtime, we're in the compiled dist directory where files are .js const enterpriseFeaturesDir = __dirname; const files = readdirSync(enterpriseFeaturesDir) .filter(file => file.endsWith('.js') && file !== 'index.js' && !file.endsWith('.js.map')); // Dynamically import all files (side-effect imports) for (const file of files) { try { await import(`./${file}`); } catch (error) { console.error(`Failed to load enterprise feature module: ${file}`, error); throw new Error(`Failed to load enterprise feature module: ${file}`); } }

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/superglue-ai/superglue'

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