title: Sharing a variable between 2 routes express
body: <p>I wanted to know if there is a way to share variables between 2 routes in expressJS without declaring it as a global. Consider I have the following routes:</p>
  
  <pre><code>exports.routeOne = (req,res) =&gt; { 
   var myVariable='this is the variable to be shared';
  }
  
  exports.routeTwo = (req,res) =&gt; {
    //need to access myVariable here
  }
  </code></pre>
  
  <p>How can this be done ?</p>