Saving a model (Mongo)

Tell us what’s happening:
I have created an instance of the model constructor I built, but I’m having trouble saving the record! I’m getting errors I don’t understand too like:
MongooseError: Operation people.insertOne() buffering timed out after 10000ms

Please help! I really want to pass this challenge.

Your project link(s)

solution: boilerplate-mongomongoose - Replit

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/102.0.5005.63 Safari/537.36 Edg/102.0.1245.39

Challenge: Create and Save a Record of a Model

Link to the challenge:

create the carlo inside callback functions

I think it has something to do with the ip address I share my database to… It was shared to my current ip address but I think it should be public, right?

Hi @ xynoan

Yes, it should.

From the FCC Mongo DB Atlas tutorial:

  • Click the green Add IP Address button.
  • In the modal, click the ALLOW ACCESS FROM ANYWHERE button. You should see 0.0.0.0/0 in the Access List Entry field.

That’s what I did, and it’s been working fine for me.

If that doesn’t help, post again, and I’ll try your code in my replit for this challenge.

1 Like

thank you for the reply Moira! :slight_smile: