title: Can I use the native 'fs' filesystem in Node.JS on Microsoft Azure?
body: <p>I've deployed a functioning bit of nodeJS code to Azure. It uses the Jade view engine, pulling in template via the fs file library:</p>
  
  <pre><code>function generateEmail(emailType, params, callback){
  fs.readFile(__parentDir + '/emailTemplates/' + emailType + '.jade', 'utf8', function (err, data) {
      var fn = jade.compile(data);
      var body = fn({data: params, moment: moment});    //The data going in to the template
      callback(body);
  });
  </code></pre>
  
  <p>}</p>
  
  <p>It works fine locally on my Mac, but the rendered email templates show up as <code>&lt;undefined&gt;&lt;/undefined&gt;</code> when received from the Azure deployment. I'm afraid there's something funky on Azure where I can't use 'fs' to load files and might have to use Blobs instead.</p>
  
  <p>Is this a limitation in Azure? Or could the problem be unrelated to this fs.ReadFile method?</p>
  
  <p>As a sanity check, I deployed this up to Nodejitsu and it works fine.</p>
  
  <p>Many thanks!</p>