I’ve set up the account on mLab (actually it is redirecting to MongoDB Atlas at this time), created the database, the admin user, whitelisted the IP from Glitch (curl ifconfig.me), and everything seems to be working fine between Glitch and MongoDB Atlas, using mongoose and getting the DB URI from .env file, I’m perfectly able to store data. Although the most basic FreeCodeCamp tests are not working
On the first challenge about MongoDB and Mongoose I get the following errors:
// running tests
// tests completed
Here’s the glitch app
Can someone help me with this?
@rafaelBadan have you been able to resolve this issue? If not, could you paste in your code and I could take a look. (I can’t see it from the Glitch app link.)
hello @dbiehle I couldn’t resolve this
here’s the code: https://glitch.com/edit/#!/alike-power
thank you for your help
Howdy, @rafaelBadan. Thank you for sharing the link.
Two things that could be happening here:
Your environment variable (MONGO_URI) hasn’t been set up in the .env file.
Your glitch app, alike-power, looks like the project from the Introduction to the Basic Node and Express Challenges not the Introduction to the MongoDB and Mongoose Challenges
Here’s what the MongoDB and Mongoose challenges project looks like:
And here’s what your app looks like:
Will you let me know if fixing either of these resolves your issue?