Dotenv

Load .env files into your process.env

npm i dotenv

Usage

As early as possible,

require('dotenv').config()

or

import 'dotenv/config'

That's it. process.env now has the keys and values you defined in your .env file

Last updated