Basic Node and Express - Use the .env File

Tell us what’s happening:

app.get(“/json”, (req, res) => {
var response = “Hello World”;
if (process.env.MESSAGE_STYLE === “uppercase”) {
response = “Hello World”.toUpperCase();
} else {
response = “Hello World”;
}
res.json({
message: response
});
});

###Your project link(s)

solution: http://localhost:3000

Your browser information:

User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.0.0 Safari/537.36

Challenge Information:

Basic Node and Express - Use the .env File

:balloon: Hi, welcome to the forum!
We see you have posted some code but did you have a question?

(You have not filled out the “Tell us what’s happening:” field above)