If I fork your code and add the required environment variables with my own DB I pass the tests.
Are you getting any errors in the console?
Make sure you add the connection string to the secrets and that you didn’t add quotes around the values. You can edit the JSON directly (Edit as JSON button) to check if they have double quotes ""somevalue"". If they do remove one of the sets of quotes.
Make sure the connection string contains the correct name/password and that you have whitelisted all IPs on MongoDB Atlas. Refer to the article linked on the challenge page.
Well, it isn’t your code because as I said it passes for me with my own DB.
So I assume there is something wrong with your connection string or you didn’t otherwise follow the correct steps. Read the MongoDB article and make sure you have done everything correctly.
Literally, all I did to make your code pass was to fill in the connection string in the environment variable. Post your connection string but replace the password so I can see it.
Considering you have already passed other challenges that require you to connect to a DB I’m not sure why this is now an issue.
I have no idea why it isn’t working for you. Is it the same cluster, database, and connection string you have used for the other challenges? If not try using one of your old connections string from the other challenges you have already used and know that worked.
You can also try starting over and following the docs.