Tell us what’s happening:
Describe your issue in detail here.
Here is the code
var express = require('express');
var app = express();
const mySecret = process.env['MESSAGE_STYLE']
app.get('/', function(req, res) {
var absolutePath = __dirname + '/views/index.html';
res.sendFile(absolutePath);
})
app.use( '/public',
express.static( __dirname + "/public")
)
app.get('/json',function(req,res){
res.json({
"message":"Hello json"
})
if(mySecret == 'allCaps'){
message = "Hello World".toUpperCase();
}
})
module.exports = app;
Your browser information:
User Agent is: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/94.0.4606.71 Safari/537.36
Challenge: Use the .env File
Link to the challenge: