Basic Node and Express - Chain Middleware to Create a Time Server

Tell us what’s happening:

I don’t know where else to look.
The second test doesn’t pass at all.
I’ve used new Date().toString(),
new Date().toISOString(),
new Date().toUCString(), and none of them validate the test.

app.get(“/now”, (req, res, next) => {

req.time = new Date().toUTCString();

next();

}, (req, res) => {

res.json({ time: req.time });

});

###Your project link(s)

solution: https://boilerplate-express-5et0.onrender.com

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:143.0) Gecko/20100101 Firefox/143.0

Challenge Information:

Basic Node and Express - Chain Middleware to Create a Time Server


This is the result I get on the route.
I believe it’s correct, but it’s not validated in the test.