I’ve managed to populate the Db, but I’m getting a timeout error in FCC.
I’m guessing it’s related to the final callback, I myself don’t feel comfortable on how it’s coded.
But I can’t figure it out. I’ve read most posts here and in SO, but I don’t see it.
This is the code that creates the documents but generates timeout-
Person.create([
new Person({
name: 'Pepe',
age: 15,
favoriteFoods: ["Pizza", "Broccoli", "Cheese", "Bread"]
}),
new Person({
name: 'Bob',
age: 75,
favoriteFoods: ["Tomatoes", "Lentils"]
}),
new Person({
name: 'Carl',
age: 95,
favoriteFoods: ["Chips", "Chorizo"]
})
], function (err, data) {
if (err) console.log(err);
});