bun-env-from-file
v1.0.4
Published
To install dependencies:
Downloads
796
Readme
bun-env-from-file
To install dependencies:
bun install bun-env-from-file
Usage
// ROOT_PASSWORD_FILE = '/var/secret/.passwd' <<-- password
const {ROOT_PASSWORD_FILE} = Bun.env
const data = new EnvFromFile(ROOT_PASSWORD_FILE)
console.log("data:", data) // password
or
const data = new EnvFromFile("ROOT_PASSWORD_FILE")
console.log("data:", data) // password
if wrong env
const data = new EnvFromFile("NO-ENV-VARIABLE")
console.log("data:", data) // ''