config({ envs: … })

Resolve ordered file and inline sources

Node.js config

dotenvx.config({ envs: [{ type: 'envFile', value: '.env' }, { type: 'env', value: 'HELLO=World' }] })

Usage

Explicit envs replace path selection. envFile values accept a path or file URL; env values accept a string or Buffer.


const dotenvx = require('@dotenvx/dotenvx')
dotenvx.config({ envs: [{ type: 'envFile', value: '.env' }, { type: 'env', value: 'HELLO=World' }] })

markdown