@yaser, milion times! hahaha . So what are you planning now?
If you really tried all the solutions here, and not working for you----
I would suggest, stop working on the current file and start again with a new link for this challenge. Before taking this decision, you can take a break for few hours and try to solve this for few more times by following the challenge instructions. Moreover, you can share your code here for a review.
var express = require(‘express’);
var app = express();
process.env.MESSAGE_STYLE=“uppercase”;
// --> 7) Mount the Logger middleware here
app.use(
express.static(__dirname + “/public”));
// --> 11) Mount the body-parser middleware here
app.get("/json",function(req,res){
if(process.env.MESSAGE_STYLE==“uppercase”)
res.json({“message”: “HELLO JSON”})
else res.json({“message”:“Hello json”})
});
this works.
Spent a lot of time on this as well, for me the solution was literally closing my repl.it project, going back to their home page and opening the repl.it project again from the My Repls page.
Very frustrating when you are trying to learn and turns out your code was correct the entire time.
thank you very much. i think mine just got solved. guys i suggest if your case still persists, you should start a new project, paste the git clone repos from the introduction and finally copy and paste all off these post. (i even recommend you do away with all the comments) #ENDSARS IN NIGERIA. PLEASEEEEE…