Tell us what’s happening:
Describe your issue in detail here.
Your code so far
Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Firefox/102.0
Challenge: Timestamp Microservice
Link to the challenge:
app.get("/api/", (req, res) => {
let time = new Date();
res.json({ unix: +time, utc: time.toUTCString() });
});
app.get(
"/api/:date",
(req, res, next) => {
let params;
if (req.params.date.length === 13) {
params = +req.params.date;
} else {
params = req.params.date;
}
req.time = new Date(params);
next();
},
(req, res) => {
if (req.time.toString() == "Invalid Date") {
return res.json({ error: "Invalid Date" });
}
res.json({ unix: +req.time, utc: req.time.toUTCString() });
}
);
You can’t use the localhost for projects only challenges
You have to deploy it somewhere.
That is what the error message means
ilenia
#6
The blue message below the input box tells you the issue, now you need to submit a live app url