Tell us what’s happening:
Describe your issue in detail here.
Please tell me where I am getting wrong and unable to pass the test case. I have set in the secret tab of repel Key as MESSAGE_STYLE while the value as uppercase as .env file but my test is not running.
You need to check the value of the environment variable while your callback function runs. Currently you only check the value when the app starts, but the tests work by changing the environment variable value.
You perhaps missed a lot of previous content if you don’t know what a callback function is.
In Express, routes takes the following structure: app.METHOD(PATH, HANDLER). METHOD is an http method in lowercase. PATH is a relative path on the server (it can be a string, or even a regular expression). HANDLER is a function that Express calls when the route is matched. Handlers take the form function(req, res) {…}, where req is the request object, and res is the response object. For example, the handler
If you check the environment variable outside of the GET handler, then the value is only checked once, when you start the app by clicking run on Replit. But the test changes the value of the environment variable while your app is running, so you need to check the value every time the GET handler (that callback function you set) runs.
Sort of. When you submit the link on freeCodeCamp, the test suite sends commands to your Replit that changes the environment variables for each test case.