node get values from dot env code example
Example 1: node dotenv
require('dotenv').config();
console.log(process.env.MY_ENV_VAR);
Example 2: dotenv not loading process.env in node
Rename your file to just .env, removing any prefix
require it as early as possible in your application with the code snippet below
require('dotenv').config();