title: process.env.PWD vs process.cwd()
body: <p>I am using Meteor JS...and within my Meteor app I am using node to query the contents of different directories within the app....</p>
  
  <p>When I use <code>process.env.PWD</code> to query the contents of a folder I get a different result from when I use <code>process.cwd()</code> to query the results of a folder.</p>
  
  <pre><code>var dirServer = process.env.PWD + '/server/';
  var dirServerFiles = fs.readdirSync(dirServer);
  console.log(dirServerFiles); 
  //outputs: [ 'ephe', 'fixstars.cat', 'sepl_30.se1', 'server.js' ]
  </code></pre>
  
  <p>vs</p>
  
  <pre><code>var serverFolderFilesDir = process.cwd() +"/app/server";
  var serverFolderFiles = fs.readdirSync(serverFolderFilesDir);
  console.log(serverFolderFiles); 
  //outputs: [ 'server.js' ]
  </code></pre>
  
  <p>using <code>process.cwd()</code> only shows <code>server.js</code> within the Meteor.</p>
  
  <p>Why is this?
  How is <code>process.cwd()</code> different from <code>process.env.PWD</code>?</p>