Tell us what’s happening:
The system test returns the following errors:
* You can POST a URL to `/api/shorturl/new` and get a
JSON response with `original_url` and `short_url`
properties. Here's an example:
`{ original_url : 'https://freeCodeCamp.org', short_url : 1}`
* When you visit /api/shorturl/<short_url>, you will be
redirected to the original URL.
Well, having said that this has been the hardest challenge faced so far, all my tests say the opposite of what the system says.
I entered many correct links, I get the JSON requested by the challenge in response, and if I send a GET request with the short url produced by my application the browser is redirected to the corresponding long link.
But the tests don’t pass.
Is there a pious soul who can tell me why?
dns.lookup takes a hostname. The hostname param has to just be the hostname and nothing more so for example replit.com and not with the protocol or any subpaths.