Basic Node and Express - Use the .env File

Tell us what’s happening:

I have created process.env, set MESSAGE_STYLE=uppercase and
used require(‘dotenv’).config() in myApp.js, but my process.env.MESSAGE_STYLE variable seems to be empty when being read in my if statement. Can anyone advise? Thanks.

Your code so far

https://freecodecam-boilerplate-17xton0eua2.ws-eu117.gitpod.io/

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36

Challenge Information:

Basic Node and Express - Use the .env File

wrong filename, the file should be named exactly .env starting with the dot

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.