title: How to pass a required file into app use
body: <p>I am trying this in app.js cuz code encapsulation is awesome</p>
  
  <pre><code>app.use('/user',require('./routes,js')(app,mongoose,passport)
  </code></pre>
  
  <p>routes.js is like </p>
  
  <pre><code>module.export=(app,mongoose,passport)=&gt;{app.post('/index',(req,res,next))}
  </code></pre>
  
  <p>but a type error keeps popping </p>
  
  <pre><code>Router.use() requires a middleware function but got a undefined
  </code></pre>