this doesn’t work. but will change according to the variable set in .env. I get the right result. If you are not familiar, if the name of your key and value pairing match, you don’t need to specify the key. The output of the code is: {"message": "HELLO JSON"}
Hello Friends, If you have problem on this challenge then read these carefully.
FCC doesn’t provide .env file with their template. So just create new .env file from New FIle dropdown. Then paste this code there: MESSAGE_STYLE=uppercase .
to pass this test you should create a new env file. Just click “new File” and with no name just type “.env”, create this file and state there MESSAGE_STYLE=uppercase;
app.get("/json",(req,res)=>{process.env.MESSAGE_STYLE==‘uppercase’?res.json({“message”: “Hello json”.toUpperCase()}) : res.json({“message”: “Hello json”})});
use only one app.get this problem was headache.
@yaser, milion times! hahaha . So what are you planning now?
If you really tried all the solutions here, and not working for you----
I would suggest, stop working on the current file and start again with a new link for this challenge. Before taking this decision, you can take a break for few hours and try to solve this for few more times by following the challenge instructions. Moreover, you can share your code here for a review.