title: Why and how does node.js cast objects assigned to process.env to strings?
body: <p>So, while working on my application, I tried assigned my config as an environment variables by creating a property <code>config</code> in the <code>process.env</code>.</p>
  
  <p>However, while using it, I found out that <code>node.js</code> casts objects to string when assigned to <code>process.env</code>.</p>
  
  <p>Here is a sample code to demonstrate this:</p>
  
  <pre><code>const config = {
      port: 3000,
      url: 'url'
  }
  
  process.env.config = config;
  
  console.log(process.env.config) // prints '[object Object]'
  console.log(typeof process.env.config) // prints 'string'
  </code></pre>
  
  <p>Is there any specific reason this happens?</p>
  
  <p>Also, assuming <code>process.env</code> is an object passed to my application when it starts, HOW is this casting achieved?</p>