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

Tell us what’s happening:
Describe your issue in detail here.
Hello can anyone help me , I am stuck here on this problem for a week and I can’t solve it , you can find my code on github

Your project link(s)

solution: GitHub - Yacineos/boilerplate-mongomongoose: A boilerplate for the freeCodeCamp curriculum.

Your browser information:

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

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

Link to the challenge:

const mongoose = require(‘mongoose’)
mongoose.connect(process.env.MONGO_URI, { useNewUrlParser: true })

const personSchema = new mongoose.Schema({
name: String,
age: Number,
favoriteFoods: [String]

const Person = mongoose.model(‘Person’, personSchema)

const createAndSavePerson = function(done) {
const yacine = new Person({name: ‘Joe’, age: 21, favoriteFoods: [‘pizza’, ‘burger’]});, data) => {
if (err) {
done(null, data);

and this is the .env file :

-----------------------------------------I give up

I can’t pass the tests , even though I created a new user(fcc) for the DB , made sure that the name is correct the password(fcc) correct , the IP adress ( made it from anywhere , and as you told me I added db1 as database name( I made that name up ) and added it after the / and before ? I can’t find the issue !


my problem is solved by changing my DNS to

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