Tell us what’s happening:
----------------------Try so many time but not pass this challenge, all time same error ( Creating and saving a db item should succeed(Time Out) )
const createAndSavePerson = (done) => {
const person = new Person({
name : ‘nik’,
age :24,
favoriteFoods : [‘pizza’]
});
person.save((err,data)=>{
console.log(data)
if(err) {
done(err)
};
done(null, data);
})
};
Describe your issue in detail here.
Your project link(s)
solution: boilerplate-mongomongoose (5) - Node.js Repl - Replit
Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/106.0.0.0 Safari/537.36
Challenge: MongoDB and Mongoose - Create and Save a Record of a Model
Link to the challenge: