skip to Main Content

Mongodb – const err = new MongooseError(message); MongooseError: Operation `fruits.insertOne()` buffering timed out after 10000ms

const mongoose = require("mongoose"); mongoose.set('strictQuery', false); mongoose.connect("mongodb://localhost:27017/fruitsDB", {useNewUrlParser: true}); const fruitSchema = new mongoose.Schema ({ name:String, rating: Number, review: String }); const Fruit = mongoose.model("Fruit", fruitSchema); const fruit = new Fruit ({ name: "Apple", rating: 7, review: "Pretty good" });…

VIEW QUESTION
Back To Top
Search