Tell us what’s happening:
I am only passing the first test, which is kinda obvious.
My code does everything exactly as expected, but still, I am not passing the test, I don’t know why.
I am saving the URLs in an Array, the redirect works fine, the post works fine it outputs the JSON as expected, still not passing the tests
I see this all the time it wont function with the replit, if you could some how run the code in a IDE like VScode , the results might be different, I ran and checked all your code and its fine CSS Javascript and Html. but there server throws theses Uncaught Errors ETC…
You are not doing the URL validation correctly. Open the network tab in the browser dev tools and look at the request/response when you submit.
dns.lookup takes a hostname, it should not have path.
new URL('https://forum.freecodecamp.org/t/back-end-development-and-apis-projects-url-shortener-microservice-i-am-not-passing-any-test/619076').hostname
// forum.freecodecamp.org