Options
All
  • Public
  • Public/Protected
  • All
Menu

External module "GetEnvironment"

Index

Functions

Functions

GetEnvironment

  • GetEnvironment(env?: string, hostnames?: HostnamesMap): string
  • Determines the environment to use.

    1. The value of the env parameter
    2. The value of process.env.NODE_ENV
    3. Determine the environment by looking up the machine's hostname.

    The hostnames dictionary is a set of key-value pairs in which the key is the name of the environment, and the value is an array of hostnames that are used for that environment. Values can be strings (in which the * is used as glob for matching) or regular expressions objects.

    Parameters

    • Optional env: string

      If passed, this is the environment that will be used

    • Optional hostnames: HostnamesMap

      Dictionary in which each key is the environment name, and the value is an array of hostnames to match.

    Returns string

    The environment to use

Generated using TypeDoc