Tell us what’s happening:
I’m coding the exact issue which is being given in the problem but still im getting a server error messege ‘Missing ‘done()’ argument’
const createAndSavePerson = (done) => {
const person = new PersonModel({
name: “John Doe”,
age: 30,
favoriteFoods: [“pizza”, “pasta”]
});
person.save((err, data)=> {
if (err) return console.error(err);
done(null, data);
});
};
this is my code
###Your project link(s)
solution: http://localhost:3000
Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/137.0.0.0 Safari/537.36
Challenge Information:
MongoDB and Mongoose - Create and Save a Record of a Model