MongoDB and Mongoose - Create a Model

mycode

let URI = process.env.MONGO_URI;
console.log(URI)
mongoose.connect(URI, { useNewUrlParser: true, useUnifiedTopology: true });

const Schema = mongoose.Schema;

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

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

freecodecamp is not submitting this solution what is the mistake

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/104.0.0.0 Safari/537.36

Challenge: MongoDB and Mongoose - Create a Model

Link to the challenge:

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.