title: How do I call .js from another .js file?
body: <p>I have mysql connection code which I need to call each time in every .js file. Say I want <code>sql.js</code> from <code>main.js</code>. I am thinking <code>include(sql.js)</code> ?</p>
  
  <pre><code> sql.js
  
   var sql = require('sql');
   var connection = sql.createConnection({
   host : 'localhost',
   user : 'root',
   password : '',
   database : 'db'
   });
  
  connection.connect(function(err){
  if(!err) {
  console.log("connected");
  }
  </code></pre>