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

Tell us what’s happening:
I have complete the code but freecodecamp still saying I missed something. please respond with time object.

app.get('/now',function(req,res,next){
  req.time=new Date().toString()
  next()
},
function(req,res){
  res.send({time: req.time})
})

Above is my code please help

Your project link(s)

solution: boilerplate-express (1) - Replit

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/112.0.0.0 Safari/537.36

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

Link to the challenge:

I forked your replit and passed the test when i run it.
I didn’t change anything, so i don’t know what is wrong here.
What test did you fail?

Are you submitting the correct link to FCC? It should be the live project link (above the Webview window) rather than the link to your project code:

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.