Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Config

An object containing the config settings. This class is internal, but an instance can be obtained using

import Config from '@xdn/core/config'
internal

Hierarchy

  • Config

Index

Methods

defaultTo

  • defaultTo(key: string, value: any): void
  • Sets a value for the specified key if one doesn't already exist

    Parameters

    • key: string

      A config key

    • value: any

      Any value

    Returns void

get

  • get(key: string, fallback?: any): any
  • Get configuration by key

    Parameters

    • key: string

      The key to grab from the config.

    • Optional fallback: any

    Returns any

getServer

  • getServer(): RequestListener | undefined
  • Returns the custom server for the JS backend.

    Returns RequestListener | undefined

has

  • has(key: string): boolean
  • Test if key exists in config

    Parameters

    • key: string

      The key to test.

    Returns boolean

loadXdnConfig

  • loadXdnConfig(): void
  • Loads XDN config and sets the current configuration.

    Returns void

Generated using TypeDoc