Hey,
I am unable to pass any of the test cases given in the problem statement but the code is working perfectly fine, it is shortening the URL by giving a unique ID and by passing that ID , it is redirecting the to target page correctly. I have no idea why the test cases are not passing.
Attaching my code below for your reference: https://5URLShortenerMicroservice.parasj08.repl.co
Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/94.0.4606.81 Safari/537.36
That’s part of being a dev. Even after you develop good “dev detective” skills, it still sometimes happens. Before the apocalypse, when we were still in offices, my cubical mate and I would sometimes have to turn to each other, “I’m sure it’s something simple, but I can’t get this to work. What am I missing?”
But still, developing those detective skills is good. I try to explain my investigative process as I go - please take a look and make sure that you understand what I did.
As your working with APIs, besides the browser dev tools, something like Postman is also a useful tool to get used to.