env variables node code example Example 1: npm node env require('dotenv').config() Example 2: windows how to set process.env variables set NODE_ENV=production