Tell us what’s happening:
Describe your issue in detail here.
Used the built-in SECRETS tab to add the variable in Replit.
// Serve JSON on a Specific Route
app.get("/json", (req, res) => {
// Use the .env File
const mySecret = process.env[“MESSAGE_STYLE”]
res.json({“message”: mySecret == “uppercase” ? “HELLO JSON” : “Hello Json”});
});
Your project link(s)
solution: https://replit.com/@rwild1/boilerplate-express
Challenge: Use the .env File
Link to the challenge: