envuse
v4.3.2
Published
Module to load environment variables from a `.envuse` file. Ideal to load configurations from the environment system, transform values and configure default values.
Downloads
53
Readme
Envuse
Module to load environment variables from a .envuse
file. Ideal to load configurations from the environment system, transform values and configure default values.
Install
npm i --save envuse
Usage
Create your .envuse
file.
DB_URI
PORT:Number=3000
and load with the parse(string)
function.
import { parse } from "envuse"
const config = parse(".envuse")
const port: number = config.PORT
Load default configs
import config from "envuse/config";
const port: number = config.PORT;
Compatibility
Check the full list here compatibility.json