Tell us what’s happening:
Describe your issue in detail here.
please can anything work just as expected on this camp, trying to chain a middleware to create a time server, usually the code should look like this right:
Your project link(s)
app.get('/now', (req, res, next) => {
req.time = new Date().toString();
next();
}, function(req, res) {
res.json({ time: req.time })
});
it actually serves time, which happens to be different from the time on my pc, and then it can’t pass the test, what should i do differently on replit
solution: boilerplate-express - Replit
Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/107.0.0.0 Safari/537.36
Challenge: Basic Node and Express - Chain Middleware to Create a Time Server
Link to the challenge: