JS Utils Kit
    Preparing search index...

    Function getEnvOr

    • Retrieve an environment variable with a fallback value.

      Parameters

      • k: string

        Environment variable name

      • fallback: string

        Default value if variable is not set

      Returns string

      If the requested variable does not exist, the provided fallback value will be returned instead.

      const port = getEnvOr("PORT", "3000");