Do i understand correctly, that if i want to query a collection, i have to do the following:
var mongoose = require(\"mongoose\"); mongoose.connect();
try this..
const mongoose = require('mongoose'); const Schema = mongoose.Schema; const ProductSchema = new Schema({}, { strict: false }); const Product = mongoose.model('Product', ProductSchema, 'products'); module.exports = { Product };