Skip to main content

Mongodb And Mongoose Free //top\\codecamp Direct

);

// DELETE: Remove this specific user await Person.findByIdAndDelete(newPerson._id); console.log('4. Deleted the test user.'); mongodb and mongoose freecodecamp

const userSchema = new mongoose.Schema( name: String, email: String, age: Number ); ); // DELETE: Remove this specific user await Person

// Schema const bookSchema = new mongoose.Schema( title: type: String, required: true , author: String, pages: Number ); console.log('4. Deleted the test user.')

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