Edward Peterson 3 years ago
commit d5784de432

@ -10,10 +10,10 @@ var bodyParser = require('body-parser')
const processors = []; const processors = [];
//load the processor files //load the processor files
glob('processors/*.processor.js', (error, matches) => { glob(path.resolve(__dirname, 'processors/*.processor.js'), (error, matches) => {
console.log(matches); console.log(matches);
_.forEach(matches, file => { _.forEach(matches, file => {
const processor = require(path.resolve('./', file)); const processor = require(path.resolve(__dirname, file));
processors.push(processor); processors.push(processor);
}) })
console.log(`${matches.length} processors loaded`); console.log(`${matches.length} processors loaded`);

Loading…
Cancel
Save