title: Mongoose .env returning undefined
body: <p>I am setting up my database connection using a MEVN stack but I am getting the following error;</p>
  
  <pre><code>The `uri` parameter to `openUri()` must be a string, got "undefined"
  </code></pre>
  
  <p>If I try console log process.env.DATABASE_URL it just returns undefined. What have I done wrong here's my code;</p>
  
  <p>index.js</p>
  
  <pre><code>import dotenv from 'dotenv';
  import Express from 'express';
  import Mongoose from 'mongoose';
  
  dotenv.config();
  
  const app = Express();
  
  Mongoose.connect(process.env.DATABASE_URL, { useNewUrlParser: true });
  
  app.listen(3000, () =&gt; {
      // console.log(process.env.DATABASE_URL);
      console.log('server started on port 3000');
  });
  </code></pre>
  
  <p>.env</p>
  
  <pre><code>DATABASE_URL="mongodb+srv://reece:&lt;password&gt;@mevn-tutorial-cluster-egjs6.mongodb.net/auth?retryWrites=true&amp;w=majority"
  </code></pre>
  
  <p>I removed my password for obvious reasons</p>