title: what does module exports = mongoose model do in NodeJs
body: <p>I am coming sort of front-end React world and have mostly used statements like import and exports. </p>
  
  <p>I know there are numerous article highlighting <strong>How</strong> we can use import and export in nodeJS and I also know that this might not have anything to do with import and export.</p>
  
  <p>Either way, I was starting to learn Backend (NodeJs) along with mongoDB. </p>
  
  <p>I am using express framework and package name mongoose. </p>
  
  <p>Inside, models, we were creating a schema as simple as this </p>
  
  <pre><code>const mongoose = require('mongoose')
  
  const bookSchema = new mongoose.Schema({
      name: String,
      genre: String, 
      authorID: String
  })
  
  
  module.exports = mongoose.model("Books", bookSchema)
  </code></pre>
  
  <p>While I understand what we are doing above, creating a schema above and exporting, I am unable to comprehend the export statement </p>
  
  <pre><code>module.exports = mongoose.model("Books", bookSchema)
  </code></pre>
  
  <p>Like, I understand it does export mongoose schema but what does <code>mongoose.model</code> do/mean? like behind the scenes? </p>