MongoDB and Mongoose - Create a Model


let URI = process.env.MONGO_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/ Safari/537.36

Challenge: MongoDB and Mongoose - Create a Model

Link to the challenge:

We need to see your full project code? Can you post a link to your GitHub repo?

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