MongoDB and Mongoose - Create a Model

Tell us what’s happening:

I have the correct code to create a model; however, when I paste my solution link, it throws an error

###Here is my code

const mongoose = require('mongoose');
require('dotenv').config();

//Connect mongoose
mongoose.connect(process.env.MONGO_URI);

const Schema = mongoose.Schema;

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

const Person = mongoose.model("Person", personSchema);

Challenge Information:

MongoDB and Mongoose - Create a Model

  • A favoriteFoods field of type [String]

Camel case favoriteFoods