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: