Tell us what’s happening:
Hi! I’m trying to pass the “.env file” challenge and it seems to be working, but I am still not passing the tests…
code:
var express = require('express');
var app = express();
app.get("/json", function (req, res) {
process.env.MESSAGE_STYLE==="uppercase"
?
res.json(
{"message": "HELLO JSON"}
)
:
res.json(
{"message": "Hello json"}
)
})
Your project link(s)
solution: https://replit.com/@ksulcova/boilerplate-express
Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/90.0.4430.93 Safari/537.36
.
Challenge: Use the .env File
Link to the challenge: