Skip to main content
Glama
settings.ts1.91 kB
import { LiaraClient } from '../api/client.js'; import { validateAppName } from '../utils/errors.js'; /** * Enable or disable zero-downtime deployment for an app */ export async function setZeroDowntime( client: LiaraClient, appName: string, enabled: boolean ): Promise<{ message: string }> { validateAppName(appName); const status = enabled ? 'enable' : 'disable'; // Note: API uses project ID, but we'll use name and let the API handle it // If needed, we might need to get the project ID first return await client.post<{ message: string }>( `/v1/projects/${appName}/zero-downtime/${status}` ); } /** * Enable or disable default subdomain for an app */ export async function setDefaultSubdomain( client: LiaraClient, appName: string, enabled: boolean ): Promise<{ message: string }> { validateAppName(appName); const status = enabled ? 'enable' : 'disable'; return await client.post<{ message: string }>( `/v1/projects/${appName}/default-subdomain/${status}` ); } /** * Enable or disable static IP for an app * Returns the IP address when enabling */ export async function setFixedIP( client: LiaraClient, appName: string, enabled: boolean ): Promise<{ message: string; IP?: string }> { validateAppName(appName); const status = enabled ? 'enable' : 'disable'; return await client.post<{ message: string; IP?: string }>( `/v1/projects/${appName}/fixed-ip/${status}` ); } /** * Enable or disable read-only mode for an app */ export async function setReadOnly( client: LiaraClient, appName: string, enabled: boolean ): Promise<{ message: string }> { validateAppName(appName); const status = enabled ? 'enable' : 'disable'; return await client.post<{ message: string }>( `/v1/projects/${appName}/read-only/${status}` ); }

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/razavioo/liara-mcp'

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