Creating a GET request for an .env file (control logic)

Tell us what’s happening:
Describe your issue in detail here.
Hi there!

I’m having a little difficulty getting past this question. If anybody could help me out, that would be kindly appreciated, so I can proceed with my learning. My code can be found in the solution link on REPLIT under the myApp.js file - with the question linked at the bottom.

I hope everyone has a wonderful new year.

Your project link(s)

solution: https://replit.com/@exagmitesam/boilerplate-express

Your browser information:

User Agent is: Mozilla/5.0 (iPad; CPU OS 14_4 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) CriOS/96.0.4664.116 Mobile/15E148 Safari/604.1

Challenge: Use the .env File

Link to the challenge:

Hello exagmitesam,

Could you provide some more details? For example, what part exactly are you getting stuck on (Storing the variable, calling it, etc)?

Hey JacenFo,

I’m not too sure really. I’m just trying to get past the question and it won’t work :confused: Here is my code:

app.get(’/json’, (req, res) => {
if (mySecret === uppercase) {
res.json({
“message”: “Hello json”.toUpperCase()
})
} else {
res.json({
“message”: “Hello json”
})
}
})

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