I have problem with complete this challenge because now we use secrets in repl it and all ok, but when i test and i press button to check this challenge happen error!. In other forums provide solution use secrets in place of .env, convert env in String but i try it, it doesn’t happen.
your issue is a logic flow one, you are getting the value of the environment variable when the app is created, instead of getting the value when the endpoint is called, so you never get a changed value
The .env file don’t work because repl-it remove this feature and change it to the secrets and the shell of repl it doesn’t allow make the file .env or in the GUI
I don’t understand why my solution is not working either…?
When I point to the /json endpoint, the object served appears to change depending on the .env variable.
The FCC test tells me otherwise!
Can anyone tell me what is wrong with my code please? https://replit.com/@igorgetmeabrain/boilerplate-express#myApp.js
I had the same problem… And in case anyone found this thread through google, the solution was to put the if(process.env.MESSAGE_STYLE==="uppercase")
INSIDE app.get(/json...