Thanks for all the suggestions . I digged further into the topic and this is what I came up with in my code files, yet, I am getting a bug, please help.Thanks
in my App.js file
let express = require('express');
const(request, response) = require('express');
require('dotenv').config();
let app = express();
console.log(process.env.MESSAGE_STYLE);
//let app = express();
//console.log(process.env//.VARIABLE_ONE)
//app.use('/pics', express.static(__dirname + '/images'));
//console.log("Hello World");
/** app.get("/", (req,res)=>{
res.send("Hello Express");
});*/
// app.get("/",function(req,res){
//res.sendFile(__dirname + "/views/index.html");
//});
app.use(express.static(__dirname + "/public"));
//serve json on a specific route
let message = {"message": "Hello json"};
//app.get('/json',(request,response)=> {
//response.json(message);
//});
/**6)use the .env File to configure app*/
//app.get("/", function(req, res){
//res.sendFile(__dirname+ '/views/index.html');
// app.use(express.static(__dirname + "/public"));
//})
//7.use the .env file
app.get("/json", (request, response)=>{
if(process.env.MESSAGE_STYLE === 'uppercase'){
response.json({"message" : "HELLO JSON"})
}else{
response.json(message)
}
});
and in my .env file
MESSAGE_STYLE = 'uppercase'