Metreeca Gear
    Preparing search index...

    Function createDotVault

    • Creates a dotenv vault.

      Parameters are read from file and parsed as a dotenv document.

      The document is read as the first request is served and the following ones are served from what it held then, so that edits made while the vault is in use are not seen for its lifetime.

      Parameters

      • file: string = ".env"

        The path of the dotenv document to be read, resolved against the base path of the execution the vault is created in, as getPath defines; defaults to .env

      Returns Vault

      A Vault retrieving parameters from file

      If created outside an execution, as service defines

      While retrieving a parameter, if the document defines no value under its key

      While retrieving a parameter, whatever reading file reports, a missing document included