Tell us what’s happening:
I dont know why my solution is not good… when i get the json i receveid “HELLO JSON”.
Your project link(s)
solution: boilerplate-express - Replit
Your browser information:
User Agent is:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/102.0.5005.61 Safari/537.36
Challenge: Use the .env File
Link to the challenge:
const mySecret = process.env['MESSAGE_STYLE']
You are checking the value of the environment variable a single time out in the global space when your app starts. But the tests work by changing the value of the environment variable when your app is running. You need to check the value of the environment variable inside of your GET handler so that your app can respond to changes in the environment variable.
This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.