title: Mongoose Model not importing in my Node.js index.js file
body: <p>I'm trying to create a model for photos for storing photos.
  I need to export the model to the index.js file but it showing the error <code>Module Not Found</code>.</p>
  <p>Models/photo.js:</p>
  <pre class="lang-js prettyprint-override"><code>    const mongoose = require('mongoose')
      mongoose.connect('mongodb://127.0.0.1:27017/byf',{ //connection to database
          useNewUrlParser : true,
          useCreateIndex :true,
          useUnifiedTopology: true
      })
      const Photo = mongoose.model('Photo',{ //model name Photo
          path:{
       
              type : String
          },
          caption : {
              type: String
          }
      })
      module.exports = mongoose.model('Photo',photoSchema)
  </code></pre>
  <p>index.js:</p>
  <pre class="lang-js prettyprint-override"><code>    const photo = require('./Models/photo')
  </code></pre>
  <p>The full error is:</p>
  <pre><code>Error: Cannot find module './Models/photo'
  Require stack:
  - C:\wamp64\www\Node.js\byf\src\index.js
      at Function.Module._resolveFilename (internal/modules/cjs/loader.js:966:17)
      at Function.Module._load (internal/modules/cjs/loader.js:859:27)
      at Module.require (internal/modules/cjs/loader.js:1028:19)
      at require (internal/modules/cjs/helpers.js:72:18)
      at Object.&lt;anonymous&gt; (C:\wamp64\www\Node.js\byf\src\index.js:5:15)
      at Module._compile (internal/modules/cjs/loader.js:1139:30)
      at Object.Module._extensions..js (internal/modules/cjs/loader.js:1159:10)
      at Module.load (internal/modules/cjs/loader.js:988:32)
      at Function.Module._load (internal/modules/cjs/loader.js:896:14)
      at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:71:12)
      at internal/main/run_main_module.js:17:47 {
    code: 'MODULE_NOT_FOUND',
    requireStack: [ 'C:\\wamp64\\www\\Node.js\\byf\\src\\index.js' ]
  </code></pre>