ここにこのコードがあります:
if(fs.existsSync('./example/example.js')){
    cb(require('../example/example.js'));
}else{
    cb();
}
fs.existSyncとは異なるディレクトリを使用する必要があるのはなぜrequireですか?
これは、不要なものを除いたディレクトリツリーになります...(私はexpress btwを使用しています)
\example
    example.js
\routes
    index.js <-- this is the one where I am using this code
app.js <-- this one requires index.js and calls its functions using app.get('/example',example.index);