dirrequire

Library for async require files in directory

dirrequire library for async require files in directory node.js.

$ npm install dirrequire
dirrequire(dirname, [include], callback)
 
include – array of file extensions for require
 
routes
    auth.js
    main.js
    404.js
    config.json
 
var dirrequire = require('dirrequire');
 
dirrequire(__dirname + "/routes", function(errroutes) {
    console.log(routes);
});