Skip to main content
Glama
configuration.controller.ts1.23 kB
import { getConfiguration as getApplicationConfiguration } from '@intlayer/config'; import type { IntlayerConfig } from '@intlayer/types'; import { formatResponse, type ResponseData } from '@utils/responseData'; import type { NextFunction, Request, Response } from 'express'; export type GetConfigurationResult = ResponseData<IntlayerConfig>; /** * Get the Intlayer configuration */ export const getConfiguration = async ( _req: Request, res: Response<GetConfigurationResult>, _next: NextFunction ): Promise<void> => { try { const config = getApplicationConfiguration(); const formattedResponse = formatResponse<IntlayerConfig>({ data: config, }); res.json(formattedResponse); return; } catch (err) { const errorMessage = (err as { message?: string; status?: number }) ?? { message: 'Internal Server Error', status: 500, }; const formattedErrorResponse = formatResponse<IntlayerConfig>({ error: { message: errorMessage.message ?? 'Internal Server Error', code: 'INTERNAL_SERVER_ERROR', title: 'Internal Server Error', }, status: errorMessage.status ?? 500, }); res.json(formattedErrorResponse); return; } };

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/aymericzip/intlayer'

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