Sudoo-Environment

Build Status codecov npm version downloads

:exclamation: Environment Control for NodeJS

Install

yarn add @sudoo/environment
# Or
npm install @sudoo/environment --save

Usage

import { Environment } from "@sudoo/environment";

type ConfigVariables = {
    readonly version: string;
};

const env: Environment = await Environment.fromFile('./config.json');
// Or
const env: Environment = Environment.fromFileSync('./config.json');

console.log(env.getKey("version")); // Version