You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
367 B
367 B
require-all
An easy way to require all files within a directory.
Usage
var controllers = require('require-all')({
dirname: __dirname + '/controllers',
filter: /(.+Controller)\.js$/,
});
// controllers now is an object with references to all modules matching the filter
// for example:
// { HomeController: function HomeController() {...}, ...}