sql >> Base de Datos >  >> NoSQL >> MongoDB

find({}) devuelve una mangosta de matriz vacía

Te falta la parte de creación del esquema, usando mongoose.Schema ,

const schoolNotices = mongoose.model("schoolNotices",
    new mongoose.Schema(
        {
            title:{
                type: String
            },
            date:{
                type:String
            },
            details:{
                type:String
            }
        },
        { collection: "schoolNotices" } // optional
    )
);