Mongoose and MongoDB failed connection

Tell us what’s happening:
Describe your issue in detail here.
Attempting to connect from the mongoose boilerplate replit project I have, but connection continues to fail. I have my MongoDB hosted in GCP, firewall access allowed and no permissions setup currently. I’m able to access it from my local machine via pymongo but when running the node app in replit getting errors. I am able to see the correct URI when using console.log()

I even copy pasted the js code from the solution in and am still getting the error.

Here is the error (I shutdown this MongoVM so it wont have the same IP later on):

Your project link(s)


Your browser information:

User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/92.0.4515.159 Safari/537.36

Challenge: Create and Save a Record of a Model

Link to the challenge:

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.