Fixed not working in prod environment

crawler
Edward Peterson 3 years ago
parent 79c0749606
commit cdd4946255

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

Loading…
Cancel
Save