Unable to update a course by its id using mongoDB and mongoose in noddejs
const mongoose = require('mongoose'); mongoose.connect("mongodb://localhost:27017/mongo-exercise") .then( ()=> console.log("Connected to MongoDB...")) .catch(err => console.error("Failed to connect to db...",err)); Below is the course schema and model const courseSchema = new mongoose.Schema({ name:String, author:String, tags:[String], date:Date, isPublished: Boolean, price:Number }); const Course =…