Basic Node and Express - Use the .env File

Tell us what’s happening:

Please someone provide me with the solution. I have tried each and every way but the solution is not getting accepted.

###Your project link(s)


Your browser information:

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

Challenge Information:

Basic Node and Express - Use the .env File

We cannot write the solution for you. Please talk to us about how this problem is confusing. Thanks

I am trying to solve the problem and come up with the solution which is running well in the browser but is not accepting by the freecodecamp as t is displaying the error ,“/json response should change according to environment variable MESSAGE_STYLE”.

Pasting the link of both the problem and the solution.
problem :-

Solution :- .env file contains :- MESSAGE_STYLE=uppercase
myApp.js file contains :-
let express = require(‘express’);
let app = express();
app.use(“/public”, express.static(__dirname + ‘/public’))

console.log(‘Hello World’)

app.get(“/”, (req, res)=>{
res.sendFile(__dirname + ‘/views/index.html’)

app.get(“/json”, (req, res)=>{
res.json({“message”: “HELLO JSON”})
else res.json({“message”: “hello json”})

module.exports = app;