Basic Node and Express (Use the .env File.)

It’s giving an error : Unexpected token r in JSON at position 0…

app.get('/json', function(req, res){
   if(process.env.MESSAGE_STYLE === "uppercase"){
      res.join({"message" : "HELLO JSON"});
   }
   else{
    res.join({"message" : "hello json"});
   }
 });

I've stored the variable MESSAGE_STYLE in the .env file..
res.join({"message" : "HELLO JSON"});

Read your code carefully.