module-index

Includes all modules within it's directory as an export.

module-index

The module-index module will include all it's sibling modules and return them as an export.

Say you have a directory structure like so:

- app/
  - controllers/
    - welcome.js
    - blog.js
    - contact.js
  - index.js

Then the you can access all the controllers by adding a controllers/index.js file like so:

// app/controllers/index.js 
require('module-index')(module);
// app/index.js 
var controllers = require('./controllers'),
    app         = require('apparator')();
 
app.get('/welcome', controllers.welcome.index);
app.get('/blogs', controllers.blog.list);
// ...