Tell us what’s happening:
I failed in test[3] ( When you visit /api/shorturl/<short_url>
, you will be redirected to the original URL.)
i don’t know where i did it wrong. It seems the redirect worked already,but test still failed
Your code so far
app.get(‘/api/shorturl/:short_url’,(req,res)=>{
//console.log(req.hostname);
res.redirect(‘/’);
})
Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.45 Safari/537.36
Challenge: URL Shortener Microservice
Link to the challenge: