Use dotenv package
import dotenv from "dotenv";
and its config
dotenv.config();
it will start reading .env file contents