skip to Main Content

Why can’t JS detect a var from .env (dotenv)?

Problem: The server cannot detect process.env.PORT from my .env file, saying PORT=5000, and I have dotenv installed. process.env.port returns undefined Is something wrong? I have a very basic express server that runs fine: const express = require('express'); const path =…

VIEW QUESTION
Back To Top
Search