I thought I had figured out what I was doing wrong but, having changed my code, it’s still not working! The /json endpoint is doing what I expect but I can’t see where I’m going wrong, because I can’t pass the challenge.
Also, console.log(messageCase) shows nothing in the replit console…
I guess it’s the vagaries of the FCC test for this challenge but I finally got it to work when I expressly set my if condition to check the env variable directly, as opposed to via a variable.
PASS: if (process.env.MESSAGE_STYLE===“uppercase”)
FAIL: const messageCase=process.env.MESSAGE_STYLE;
…
if (messageCase===“uppercase”)