Function fileLoader

  • File loader loads configuration with cosmiconfig from file system.

    It is designed to be easy to use by default:

    1. Searching for configuration file starts at process.cwd(), and continues to search up the directory tree until it finds some acceptable configuration.
    2. Various extensions are supported, such as .json, .yaml, .toml, .js and .cjs.
    3. Configuration base name defaults to .env (so the full name is .env.json or .env.yaml), separate file for each environment is also supported. For example, if current NODE_ENV is development, .env.development.json has higher priority over .env.json.

    Parameters

    Returns (() => Record<string, any>)

      • (): Record<string, any>
      • Returns Record<string, any>

Generated using TypeDoc