Tell us what’s happening:
so I followed the instructions to make an endpoint at /json of my app
Please help, thx very much
Your code so far
this is the .env file
and my code at app.js
var express = require(‘express’);
var app = express();
const response = “Hello Json”
app.get(’/json’, (req,res) => {
if(process.env.MESSAGE_STYLE === “uppercase”){
res.send({message: response.toUpperCase()})
}
else {
res.send({message: response})
}
})
Your browser information:
User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_4) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.1 Safari/605.1.15
.
Challenge: Use the .env File
Link to the challenge: