include env file using dotenv in package.json code example Example 1: dotenv require('dotenv').config() Example 2: .env npm install dotenv