問題:
How do I require all files in a folder in node.js?如何在node.js的文件夾中需要所有文件?
need something like:需要類似的東西:
files.forEach(function (v,k){
// require routes
require('./routes/'+v);
}};
解決方案:
參考一: https://stackoom.com/question/MVf6參考二: node.js require all files in a folder?