title: Can't read environment variables from a Grunt server-run Node + AngularJS app
body: <p>I've created an app on AngularJS and Firebase. I decided to store the Firebase credentials as environment variables. I am on Ubuntu, and I run the development server using Grunt.</p>
  
  <p>I tried creating a <code>.bashrc</code> file to store the environment variables as shown below (with the values inserted between the quotes).</p>
  
  <pre><code>export APIKEY=""
  export AUTH_DOMAIN=""
  export DATABASE_URL=""
  export STORAGE_BUCKET=""
  export MESSAGING_SENDER_ID=""
  </code></pre>
  
  <p>I then have a <code>config.js</code> file that uses these variables to configure Firebase.</p>
  
  <pre><code>var config = {
      apiKey: process.env.APIKEY,
      authDomain: process.env.AUTH_DOMAIN,
      databaseURL: process.env.DATABASE_URL,
      storageBucket: process.env.STORAGE_BUCKET,
      messagingSenderId: process.env.MESSAGING_SENDER_ID
  };
  
  firebase.initializeApp(config);
  </code></pre>
  
  <p>However, I think Grunt does not pick up these values, because whether I run the Grunt server or run the app using <code>node server.js</code>, it doesn't find a value for these variables. I also tried creating the variables from the command line first, like so (with the value inserted between the quotes).</p>
  
  <pre><code>$ export APIKEY=""
  </code></pre>
  
  <p>Regardless, my app is unable to see the environment variables. It delivers this error in the console.</p>
  
  <pre><code>Uncaught ReferenceError: process is not defined at config.js:2
  </code></pre>
  
  <p>The app runs fine when I insert the values directly into the <code>config.js</code> file. I tried a variety of options for configuring variables in Ubuntu, and none seem to be working.</p>
  
  <p><strong>Edit:</strong>
  <em>It also might be worth noting that Heroku also does not recognize the variables, though I have registered them with Heroku, and it delivers the same error (<code>process is not defined</code>). Could it be something with Angular?</em></p>