Chain Middleware to Create a Time Server not passning

Tell us what’s happening:
Describe your issue in detail here.

The /now endpoint should return a time that is +/- 20 secs from now

// Chain Middleware to Create a Time Server
app.get("/now", (req, res, next) => {
req.time = new Date().toString();
// Call the next function in line:
next();
}, (req, res) => {
res.json({ time: req.time });
});

Your project link(s)

solution: https://replit.com/@rwild1/boilerplate-express

Challenge: Chain Middleware to Create a Time Server

Link to the challenge:

`res.json({
"time": req.time
)};
`
and check your time on the computer

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