title: How to use regular Javascript variables in Expressjs or Nodejs
body: <p>Is there a way i can export variables from regular javascript to be used in expressjs?</p>
  
  <p>i have tried using 'exports' but it didn't work.</p>
  
  <p>for example in regular js file</p>
  
  <pre><code>var search ='hello';
  exports= search;
  </code></pre>
  
  <p>then in express file</p>
  
  <pre><code>var search= require("./file.js");
  console.log(search);
  </code></pre>
  
  <p>all i get in the console is '{}'.</p>
  
  <p>What i want is for the variable 'search' to work in my express file as well. is there a way to do this</p>