diff --git a/index.js b/index.js index a3b4002..1831055 100644 --- a/index.js +++ b/index.js @@ -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`);