title: How set different Node.js environment per app
body: <h2>Scenario</h2>
  
  <ul>
  <li>Node.js runs on a server with Ubuntu Server OS</li>
  <li>On this server runs <strong>4 different Node app</strong></li>
  <li><strong>Nginx</strong> is installed and used <strong>as a proxy</strong>, so first app is listening on 8081 port the second on 8082 and so on, but users can access to up with standard port (80/443)</li>
  <li>app runs under <strong>forever</strong> </li>
  </ul>
  
  <h2>Question</h2>
  
  <p>it's possible <strong>set</strong> a <strong>different environment per</strong> every <strong>app</strong>?</p>
  
  <p>for example i'd like to have an environment MYSQL_USER set in different way.
  every app have a config.js that contain a string as follow:</p>
  
  <pre><code>exports.mysql_user = process.env.MYSQL_USER || 'devuser';
  </code></pre>
  
  <p>I see that is possible add some module to manage an external env file.
  I'd like manage that <strong>without a module</strong> if is possible.</p>
  
  <p><strong>There is a way to do that?</strong></p>
  
  <p>I see that is possible load ENV in this way:</p>
  
  <pre><code>ENV_1="first value" ENV_2="second value" node app.js
  </code></pre>
  
  <p>or (in my case)</p>
  
  <pre><code>ENV_1="first value" ENV_2="second value" forever start app.js
  </code></pre>
  
  <h2>Conclusion</h2>
  
  <ul>
  <li><strong>It is possible to automate this?</strong></li>
  <li><strong>This approach has contraindications?</strong></li>
  <li><strong>It is preferable to use another solution?</strong></li>
  </ul>