title: Error: Configuration property "mongoURI" is not defined
body: <p>I try to start a project but when I try to connect the mongo with the server I encounter an error that shows that the connection is not working because it can not find the folder where the connection string.</p>
  
  <p>my db file:</p>
  
  <pre><code>const mongoose = require('mongoose');
  const config = require('config');
  const db = config.get('mongoURI')
  
  
  const connectDB = async () =&gt; {
  
  try{
      await mongoose.connect(db);
      console.log('MongoDB connected..');
  }catch(err){
      console.error(err.message);
      process.exit(1)
  }
  }
  
  module.exports = connectDB;
  </code></pre>
  
  <p>my defualt.json:</p>
  
  <pre><code>{
   "mongoURI": "mongodb+srv://&lt;username&gt;:&lt;password&gt;@devconector- 
   zfloj.mongodb.net/test?retryWrites=true&amp;w=majority"
  }
  </code></pre>
  
  <p>the error:
       WARNING: No configurations found in configuration directory:C:\Users\Yair 
       Azaria\Desktop\תכנות\node.js\DevConnector\config
       WARNING: To disable this warning set SUPPRESS_NO_CONFIG_WARNING in the 
       environment.
       C:\Users\Yair 
       Azaria\Desktop\node.js\DevConnector\node_modules\config\lib\config.js:203
       throw new Error('Configuration property "' + property + '" is not defined');
       ^</p>
  
  <pre><code>Error: Configuration property "mongoURI" is not defined at Config.get(C:\Users\YairAzaria\Desktop\תכנות\node.js\DevConnector\node_modules\config\lib\config.js:203:1)
  at Object.&lt;anonymous&gt; 
  (C:\Users\YairAzaria\Desktop\תכנות\node.js\DevConnector\config\db.js:3:19)
  at Module._compile (internal/modules/cjs/loader.js:689:30)
  at Object.Module._extensions..js (internal/modules/cjs/loader.js:700:10)
  at Module.load (internal/modules/cjs/loader.js:599:32)
  at tryModuleLoad (internal/modules/cjs/loader.js:538:12)
  at Function.Module._load (internal/modules/cjs/loader.js:530:3)
  at Module.require (internal/modules/cjs/loader.js:637:17)
  at require (internal/modules/cjs/helpers.js:22:18)
  at Object.&lt;anonymous&gt; 
  (C:\Users\YairAzaria\Desktop\תכנות\node.js\DevConnector\server.js:2:19)
  at Module._compile (internal/modules/cjs/loader.js:689:30)
  at Object.Module._extensions..js (internal/modules/cjs/loader.js:700:10)
  at Module.load (internal/modules/cjs/loader.js:599:32)
  at tryModuleLoad (internal/modules/cjs/loader.js:538:12)
  at Function.Module._load (internal/modules/cjs/loader.js:530:3)
  at Function.Module.runMain (internal/modules/cjs/loader.js:742:12)
  </code></pre>