config({ environment: … })

Choose the environment for a naming convention

Node.js config

dotenvx.config({ convention: 'rails', environment: 'production' })

Usage

Use with convention. This selects the convention environment without changing process.env.NODE_ENV or RAILS_ENV.


const dotenvx = require('@dotenvx/dotenvx')
dotenvx.config({ convention: 'rails', environment: 'production' })

markdown