From cdd494625511eea034441f31dba04dab6514a6aa Mon Sep 17 00:00:00 2001 From: Edward Peterson Date: Thu, 17 Nov 2022 20:10:08 -0500 Subject: [PATCH] Fixed not working in prod environment --- index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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`);