BlueForge Docs

client.cdn.config

Get CDN provider configuration.

Signature

class Client {
  cdn: {
    config(): Promise<{ provider: string; baseUrl?: string }>
  }
}

Parameters

None.

Examples

import { Client } from '@blueforge/client'
const bf = new Client({ apiKey: process.env.BF_API_KEY!, url: 'https://your-project.blueforge.dev' })
const { provider, baseUrl } = await bf.cdn.config()
console.log(`Provider: ${provider}`, baseUrl ? `Base URL: ${baseUrl}` : '')

Throws

ErrorCondition
ApiError
API request failed
NetworkError
Network issue

Pitfalls

  • Plan restriction — CDN is only available on paid plans
  • Empty response — if no CDN provider is configured,
    provider
    will be empty and
    baseUrl
    omitted

See also

{auto-injected}

Tested against

{auto-injected}