Basic Node and Express Use the .env file not working

The test for the Basic Node and Express Use the .env file is not working

var express = require('express');
var app = express();
var absolutePath = __dirname + "/views/index.html"

var assetPath = __dirname + "/public"


app.get("/", function(req,res){

var response = "Hello json";
app.get("/json", function(req,res){
  if(process.env.MESSAGE_STYLE == "uppercase"){
     response = response.toUpperCase()
    "message" : response

and a .env file that I made:


Here is is on

What am I missing?

Your browser information:

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

Challenge: Use the .env File

Link to the challenge:

there is this discussion pinned in #support :

no idea what’s going on there

1 Like

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