Tell us what’s happening:
Hi, the time response from the server is the same as my computer but the FCC says that the response does not return a time that is +/- 20 secs from now. Is there a way to pass the lesson with this bug?
Your code so far
app.get("/now", (req, res, next) => {
req.time = new Date().toString();
next();
},(req, res) => {
res.send({time: req.time});
});
Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:77.0) Gecko/20100101 Firefox/77.0
.
Challenge: Chain Middleware to Create a Time Server
Link to the challenge:
Cannot post a link