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
| Error | Condition |
|---|---|
| API request failed |
| Network issue |
Pitfalls
- Plan restriction — CDN is only available on paid plans
- Empty response — if no CDN provider is configured,
will be empty andprovider
omittedbaseUrl
See also
{auto-injected}
Tested against
{auto-injected}