Https://www.freecodecamp.org/learn/apis-and-microservices/mongodb-and-mongoose/create-a-model

Tell us what’s happening:
I’m new in MongoDB and I can’t complete this task. I’ve used the code bellow

Your code so far

const Schema = mongoose.Scema;

const personSchema = new Schema({
name: { type: String, required: true },
age: Number,
favoriteFoods: [String]
});

var Person = mongoose.model(“Person”, personSchema);

Your browser information:

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

Challenge: Create a Model

Link to the challenge:

Check the very first line. The word Schema is spelled right once, wrong once.

Oh, yeah, thank you :blush:

1 Like