Skip to main content

# loadAppConfig()

    function loadAppConfig(configPath: string): Promise<void>;

Loads the application configuration from a JSON file. Attempts to fetch from versioned path first, then falls back to unversioned path. Merges environment-specific configuration with base configuration.

## Parameters​

### configPath​

`string` = `...`

Path to the directory containing app.config.json (defaults to asset path)

## Returns​

`Promise`<`void`>

## Throws​

Error if config file is not found or contains invalid JSON

## Example​

    // Load from default location
    await loadAppConfig();

    // Load from custom path
    await loadAppConfig('/custom/path');

    // After loading, access config values
    const apiUrl = getAppConfigValue('serviceEndpoints.api');