title: Controller with multi action in Express.JS?
body: <p>I'm making routing by Express. my app load all controllers and each controller has multi action. However, in my controller, Express Router just load default action in my controller and error with all others</p>
  
  <blockquote>
    <p>Cannot GET /index/action1234</p>
  </blockquote>
  
  <p><br>For more specific, this is my code.<br>The route in app.js</p>
  
  <pre><code>fs.readdirSync('./controllers').forEach(function (file) {
      if(file.substr(-3) == '.js') {
          app.use(require('./controllers/' + file));
      }
  });
  </code></pre>
  
  <p><br>The controller index.js<br></p>
  
  <pre><code>var express = require('express');
  var router = express.Router();
  router.get('/', function(req, res) {
      res.send("index/index");
  });
  router.get('/:action', function(req, res) {
      res.send("index/"+req.params.action);
  });
  module.exports = router;
  </code></pre>
  
  <p>Do I have to pass the "app" param to controller and use this instead of router module?<br>Thanks</p>