Currently working on the .env file part of the course. I can’t submit my answer even if I think it’s correct. They asked me to change the JSON object response on the /json endpoint to uppercase if process.env.MESSAGE_STYLE is equal to uppercase I did so with this simple function :
I’ve edited your post for readability. When you enter a code block into a forum post, please precede it with a separate line of three backticks and follow it with a separate line of three backticks to make it easier to read.
You can also use the “preformatted text” tool in the editor (</>) to add backticks around text.
I don’t think so because, in order to complete the .env challenge, I need to create the .env file in the server.js where I have my router I need to transform my response in the GET route handler on the /JSON endpoint
/******************************************************
* PLEASE DO NOT EDIT THIS FILE
* the verification process may break
* ***************************************************/
I still can’t submit my answer, I have this error :
’ The response of the endpoint /JSON should change according to the environment
variable MESSAGE_STYLE (Test timed out) ’
I did all my changes on my App.js
Yes, I did stop the server and restart it multiple times, and sometimes I don’t get anything even if I don’t change anything. I get “The repl didn’t wake up in time. Please try again in 30 seconds” this on my page
It is no longer working. You seem to already have one app running (the old version of it) and when you click Run it is creating a new one and I am not sure which version has the correct code. Make sure to stop all of them and only start one instance.
Another option is to just fork your project so all your code goes to a new project, add the environment variable, and click Run and use the new url to submit. Then, I would delete the older project to not cause confusion.