Use the .env File replit-not getting through

app.get("/json", (req, res) => {
let mySecret = process.env['MESSAGE_STYLE']
  if(mySecret === "uppercase") {
     res.json({"message": "Hello json".toUpperCase() });
     res.json = ({"message": "Hello json"});

any help? not getting through.

Thanks for help this seems to be working but even the test is not passed. using replit.
the link is

Dear Randell, thanks a lot, it solved the problem and I learned a bit more about replit as well. great thanks again.

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.