Tell us what’s happening:
cannot pass two of the tests here out of the 4 tests. Trying to figure out whats wrong with my code.
kindly delete my previous post for the same problem as I was unable to post my file link in there and unable to delete my previous thread as well. https://repl.it/@meeramenon07/boilerplate-project-urlshortener-1#README.md Your code so far
Here is my repl.it link https://repl.it/@meeramenon07/boilerplate-project-urlshortener-1#README.md
Your browser information:
User Agent is: Mozilla/5.0 (Linux; Android 10; SM-A107F) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/84.0.4147.111 Mobile Safari/537.36.
Hi! Is your server successfully able to connect to the MongoDB instance? I would guess that it might be failing there, which would cause the POST route to hang and the second test to fail. Check your console and see that there are no connection errors; make sure you are stopping and restarting your service if you are changing anything in the .env file, as it’s only read once at startup.
For the third test, you can see that there is an undefined variable causing a ReferenceError by trying to navigate to the GET route e.g. https://boilerplate-project-urlshortener-1.meeramenon07.repl.co/api/shorturl/1:
Looking through your code, it looks like your MongoDB url maybe the problem. I cant find any sites with uoknb.mongodb.net. Where did you setup your DB at?
I had set it up at mongo db atlas and i was able to pass the mongoose challenge earlier in this microservice projects . wonder why its not working now.