Cuéntanos qué está pasando:
I do not understand why not the requirements, I think the solution is fine, can someone help me to see if I have something wrong? I am transforming the value of the object to uppercase as requested but it does not pass the requirements.
Tu código hasta el momento
app.get("/", function (req, res) {
res.sendFile(absolutePath);
})
app.use("/public", express.static(__dirname + "/public"));
const mySecret = process.env['MESSAGE_STYLE'];
let respuesta;
console.log(mySecret);
if(process.env['MESSAGE_STYLE'] === "uppercase"){
respuesta = "Hello json".toUpperCase();
console.log(respuesta);
}else{
respuesta = "Hello json";
console.log(respuesta)
}
app.get("/json",(req,res) => {
res.json({"message":`${respuesta}`});
});
The response you are sending is correct and changes depending on the value of the variable but it does not pass the requirements
Link to replit
https://replit.com/@EduMC14/boilerplate-expressCurso2#myApp.js
Información de tu navegador:
El agente de usuario es: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/104.0.0.0 Safari/537.36
Desafío: Node y Express Basico - Usa el archivo .env
Enlaza al desafío:

