ENV file help?!

Tell us what’s happening:


I’m having trouble understanding where to add this part of the code. Can someone please explain where to put the env. variable and the if statement.

Your code so far
var express = require(‘express’);
var app = express();

console.log(“Hello World”);

app.get("/", function(req, res) {
res.sendFile(__dirname + “/views/index.html”);

app.use(express.static(__dirname + “/public”));

app.get("/json", (req, res) => {
“message”: “Hello json”

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/81.0.4044.138 Safari/537.36.

Challenge: Use the .env File

Link to the challenge:

Try to write your own version version and then if you get stuck, post a link to your Glitch project.