Skip to content

Init Config

The Codedraw Client exposes a function to initialize the configuration for the client application.

typescript
import type { Env } from 'hono/dist/types/types'

type initConfig<E extends Env = Env> = () => Promise<E | null>

The function returns either the configuration or null if the configuration is not available.

Usage

typescript
const config = await sdk.Config.init<{ FOO: string, BAR: string }>()