Skip to main content
Glama
init-env.ts815 B
import path from "path"; import dotenv from "dotenv"; import { getThisDirname } from "./lib/this-file-path"; const __dirname = getThisDirname(import.meta.url); // config setup inspired by vite and other similar tools // will replace with more feature complete config system later if we need const mode = (process.env.NODE_ENV || 'development').toLowerCase(); const envFiles = [ // actual ENV vars override everything, // then the following files in order of precedence `.env.${mode}.local`, // local overrides for specific env (not recommended to use...) `.env.local`, // local overrides (gitignored!) `.env.${mode}`, // specific env mode, ex `.env.production` `.env`, // defaults ]; envFiles.forEach((filename) => { dotenv.config({ path: path.resolve(`${__dirname}/../${filename}`), }); });

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/systeminit/si'

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