1.0.4 • Published 9 months ago

bun-env-from-file v1.0.4

Weekly downloads
-
License
-
Repository
-
Last release
9 months ago

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) // ''
1.0.4

9 months ago

1.0.3

9 months ago

1.0.2

9 months ago

1.0.1

9 months ago