how to fetch data from mongodb using mongoose code example
Example: not fetch data from mongoose
//All objects add 's' behind => 'student' to 'students'
const mongoose = require("mongoose");
const Schema = mongoose.Schema;
const StudentSchema = new Schema({
name: String,
dob: Date,
mobile: String,
address: String,
});
// tat ca phai them chu s dang sau
module.exports = mongoose.model("students", StudentSchema);