MongoDB and Mongoose - Create and Save a Record of a Model

Hey guys, I’m getting this result when I click to complete the challenge:

// running tests
Creating and saving a db item should succeed (Test timed out)
// tests completed

Can someone explain to me why it’s not working? Guess I’ve already done everything I’ve read in the forum. Thanks in advance

solution: boilerplate-mongomongoose - Nix (beta) Repl - Replit

Challenge: MongoDB and Mongoose - Create and Save a Record of a Model

Link to the challenge:

Your code is passing for me with my own DB. Did you add the connection string to the Secrets on Replit?

Hello @lasjorg , I did it. You can see it here named as “CONN_STRING”

I’m getting this message in console:

What is the full error message? Add a catch to mongoose.connect as shown in the docs and log out the reason property.

Make sure your name and password are correct and that you have whitelisted your IP (or whitelist and that you added the DB name to the connection string (guide). The full error message might have more information about why it is failing, otherwise, the error is pretty generic and can likely be caused by a few different things (Google search)

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