title: Difference between destructing export default and module.exports
body: <p>I've been struggling to destruct my mongo object in another file, my object structure is like below.</p>
  
  <pre><code>  const env = {
         project: 'CRIBBBLE BACKEND',
         url: 'localhost',
         api: {
           url: 'https://api.dribbble.com/v1/',
         },
         port: parseInt(process.env.PORT, 10) || 3000,
         mongo: database,
  };
  
   export default env;
  </code></pre>
  
  <p>But when I'm trying to <code>import</code> the <code>mongo</code> object in another <code>js</code> file like this <code>{ mongo } from 'config'</code> the returned value is <code>undefined</code>. 
  But if I change the export default value to <code>module.exports</code> it works as its expected.</p>
  
  <p>So, I'm just wondering what is the difference between <code>module.exports</code> and <code>export default</code>?</p>