Node y Express Basico - Usa el archivo .env

Cuéntanos qué está pasando:
Describe tu problema en detalle aquí.
No entiendo porque no pasan los requerimientos , pienso que esta bien la solución, alguien me puede ayudar par ver si tengo algo mal? estoy transformando el valor del objeto a mayúsculas como me lo pide pero no pasa los requerimientos.

Enlace(s) de tu proyecto

let express = require('express');
let app = express();

/* app.get("/", function(req, res) {
  res.send("Hello Express");
}); */

let absolutePath = __dirname + "/views/index.html"

app.get("/", function (req, res) {
  res.sendFile(absolutePath);
})

app.use("/public", express.static(__dirname + "/public"));
const mySecret = process.env['MESSAGE_STYLE'];
 let respuesta;

  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}`});
});

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:

I’m pretty sure you are getting a syntax error here, be careful, check that you close everything you open!

1 Like

Hi, I’ve closed it but it still doesn’t pass me the requirements and I don’t understand why and the answer I sent is correct and changes depending on the value of the variable.
Captura de pantalla (114)

Please post the link to your replit, I have no idea what your code so it’s impossible to help

1 Like

https://replit.com/@EduMC14/boilerplate-expressCurso2#myApp.js

Thanks