Skip to main content
Glama
index.ts724 B
import { drizzle as drizzleNode } from "drizzle-orm/node-postgres" import { drizzle } from "drizzle-orm/vercel-postgres"; import * as schema from "./schema"; import { sql } from "@vercel/postgres"; import { Pool } from "pg"; const pool = new Pool({ connectionString: process.env.DATABASE_URL, }); const dbVercel = drizzle(sql, { schema, logger: true }); const dbNode = drizzleNode(pool, { logger: true, schema }); // Export the appropriate database instance based on environment export const db = process.env.DATABASE_URL ? dbNode : dbVercel; // Export utils functions export { slugifyText, generateSlug, generateUniqueString } from "./utils/generate-string"; export { generateRandomName } from "./utils/random-name";

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/metacode0602/open-mcp'

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