title: why exports returns undefined however module.exports returns the right data
body: <p>i have a <code>database.js</code> file. in this file i have 3 functions named <code>connect</code>, <code>getDb</code> and <code>disconnect</code>. 
  when i use <code>exports</code> (the below code) , the <code>require</code> function loads nothing! and when i use module.exports, every thing goes in the right way! whats wrong with <code>exports</code> here?</p>
  
  <pre><code>// my database.js file
  
  const MongoClient = require('mongodb').MongoClient;
  
  const database_name = 'car-repair';
  const uri = `mongodb://localhost:27017/${database_name}`;
  
  let database;
  
  const connect = () =&gt; {
    let options = {
      useNewUrlParser: true,
      useUnifiedTopology: true
    };
  
    try {
        MongoClient.connect(uri, options, (err, db) =&gt; {
            database = db;
            console.log('connected to database.');
        });
    } catch (e) {
        console.log(e);
    }
  };
  
  const getDB = () =&gt; database;
  
  const disconnect = () =&gt; database.close();
  
  exports = {
      connect, getDB, disconnect
  };
  
  </code></pre>
  
  <p>if i use the code like the below, it returns <code>undefined</code></p>
  
  <pre><code>// my app.js file
  const database = require('./database');
  
  console.log(database.connect); // undefined!
  </code></pre>
  
  <p>when i change the <code>exports</code> to <code>module.exports</code> everything works properly.</p>
  
  <pre><code>module.exports = {
      connect, getDB, disconnect
  };
  </code></pre>
  
  <p>whats wrong with <code>exports</code>?</p>