title: Best practice when using an API key in Node.js
body: <p>I have an API key I'm using in my Node.js application. Currently, I keep it stored in a text file and put it in a global variable when my application starts up.</p>
  <p>So basically it's just:</p>
  <pre><code>var key = getKey();
  useKeyGetData(key);
  </code></pre>
  <p>I don't like having this global variable, and it's a pain to pass between files. Is there a better way to get my key where/when I need it? Is there some standard for doing so?</p>