Refactor searching
This commit is contained in:
parent
87649b5a3a
commit
bbcbe8d871
9 changed files with 155 additions and 122 deletions
13
lib/services.js
Normal file
13
lib/services.js
Normal file
|
@ -0,0 +1,13 @@
|
|||
"use strict";
|
||||
var path = require('path');
|
||||
var Promise = require("bluebird");
|
||||
|
||||
module.exports = [];
|
||||
|
||||
require("fs").readdirSync(path.join(__dirname, "services")).forEach(function(file) {
|
||||
var service = require(path.join(__dirname, "services", file));
|
||||
if (service.search) {
|
||||
module.exports.push(service);
|
||||
}
|
||||
});
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue