title: How to return array of functions from required sub page in Express, Nose.js
body: <p>I build an app in <strong>node.js</strong> using <strong>Express</strong> server.<br>
  My app contain an index.js page, Dal.js page that will be able to return an array of DB function (insert,delete...).
  I tried to do it in this way:<br>
  *</p>
  
  <blockquote>
    <p>//index.js
    <br></p>
  </blockquote>
  
  <pre><code>var express = require('express');
  var app = express();
  Dal=require('./Server/DB/Dal')(app);
  </code></pre>
  
  <blockquote>
    <p>//Dal.js<br></p>
  </blockquote>
  
  <pre><code>    module.exports=function(app)
      {
         var add=function(table,values, obj, next){
                   //tha action
         }
  
         var update=function(table,values, next){
               //tha action
         }
  
      **return** {
          Add:add,
          Update:update
      }
  }
  </code></pre>
  
  <p>*
  <br></p>
  
  <p>But it doesnt work!!</p>
  
  <p>What is the problem??</p>
  
  <p>Thanks in advance.</p>