I get the issue: Creating an instance from a mongoose schema should succeed
import mongoose from 'mongoose';
const Schema = mongoose.Schema;
const personSchema = new Schema({
name : { type: String, required: true},
age : Number,
favoriteFoods : [String]
});
const Person = mongoose.model("Person", personSchema);
Challenge: Create a Model
Link to the challenge:
Check out the mongoose docs and see how they define their schema there. Hopefully that should resolve the issue
1 Like
system
Closed
3
This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.