Tell us what’s happening:
Tests are not responding to EST i think.
Error Message: The /now endpoint should return a time that is +/- 20 secs from now.
The response: {“time”:“Fri Jul 17 2020 03:13:02 GMT+0000 (Coordinated Universal Time)”}
It was 11:13pm EST when I ran this.
I also copy/pasted both solutions in the hint with the same results.
Your code so far
app.get(
‘/now’,
(req, res, next) => {
req.time = new Date().toString();
next();
},
(req, res) => {
res.json({
“time”: req.time
});
}
);
Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.116 Safari/537.36
.
Challenge: Chain Middleware to Create a Time Server
Link to the challenge: