Skip to content

nsuite v2.2.1


nsuite / parseEnvFiles

Function: parseEnvFiles()

parseEnvFiles(pathArr): DotenvConfigOutput

Defined in: UtilsEnv.ts:22

Parses environment files using dotenv.

Parameters

pathArr

string[]

An array of paths to the environment files.

Returns

DotenvConfigOutput

returns - The result of the dotenv configuration.

Example

ts
import { parseEnvFiles } from "nsuite";

// Note: the first value set for a varialble will win
parseEnvFiles([
  path.resolve(process.cwd(), ".env.local"),
  path.resolve(process.cwd(), ".env"),
]);

Released under the Apache-2.0 License.