Skip to main content
Glama
config.ts1.06 kB
/** * Configuration constants and settings */ export const API_VERSION = "v1"; export const API_BASE_URL = "https://api.example.com"; export const TIMEOUT = 5000; export const MAX_RETRIES = 3; export enum Environment { Development = "development", Staging = "staging", Production = "production", } export const CONFIG = { api: { baseUrl: API_BASE_URL, version: API_VERSION, timeout: TIMEOUT, }, features: { analytics: true, darkMode: true, notifications: false, }, limits: { maxUploadSize: 10 * 1024 * 1024, // 10MB maxRequests: 100, rateWindow: 60000, // 1 minute }, } as const; export type AppConfig = typeof CONFIG; export class ConfigManager { private config: Partial<AppConfig> = {}; get<K extends keyof AppConfig>(key: K): AppConfig[K] { return (this.config[key] || CONFIG[key]) as AppConfig[K]; } set<K extends keyof AppConfig>(key: K, value: AppConfig[K]): void { this.config[key] = value; } reset(): void { this.config = {}; } } export { Environment as Env };

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/mhalder/qdrant-mcp-server'

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